from dc_theme.settings import get_pipeline_settings
from dc_theme.settings import STATICFILES_FINDERS
STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage'

PIPELINE = get_pipeline_settings(
    extra_css=[
        'custom_css/style.scss',
        'font-awesome/css/font-awesome.min.css',
    ],
    extra_js=[],
)
PIPELINE['JS_COMPRESSOR'] = 'pipeline.compressors.uglifyjs.UglifyJSCompressor'
PIPELINE['UGLIFYJS_BINARY'] = 'node_modules/uglify-js/bin/uglifyjs'
PIPELINE['STYLESHEETS']['map'] = {
    'source_filenames': [
        'leaflet/dist/leaflet.css',
        'custom_css/map.css',
        'leaflet-extra-markers/dist/css/leaflet.extra-markers.min.css',
    ],
    'output_filename': 'css/map.css',
}
PIPELINE['JAVASCRIPT']['map'] = {
    'source_filenames': [
        'leaflet/dist/leaflet.js',
        'leaflet-extra-markers/dist/js/leaflet.extra-markers.min.js',
        '@mapbox/polyline/src/polyline.js',
        'custom_js/polyline_global.js',
        'custom_js/map.js',
    ],
    'output_filename': 'js/map.js',
}
COMPRESS_CSS_FILTERS = ['compressor.filters.css_default.CssAbsoluteFilter']

from dc_theme.settings import get_pipeline_settings
from dc_theme.settings import STATICFILES_FINDERS, STATICFILES_STORAGE

PIPELINE = get_pipeline_settings(
    extra_css=[
        'custom_css/style.scss',
        'font-awesome/css/font-awesome.min.css',
    ],
    extra_js=[],
)

PIPELINE['STYLESHEETS']['map'] = {
    'source_filenames': [
        'leaflet/dist/leaflet.css',
        'custom_css/map.css',
        'leaflet-extra-markers/dist/css/leaflet.extra-markers.min.css',
    ],
    'output_filename': 'css/map.css',
}

PIPELINE['JAVASCRIPT']['map'] = {
    'source_filenames': [
        'leaflet/dist/leaflet.js',
        'leaflet-extra-markers/dist/js/leaflet.extra-markers.min.js',
        '@mapbox/polyline/src/polyline.js',
        'custom_js/polyline_global.js',
        'custom_js/map.js',
    ],
    'output_filename': 'js/map.js',
}

Remove old pipeline and compressor settings
Remove old pipeline and compressor settings

libsass has a compresssion mode that's enabled by default in the 0.3
dc base theme. This removes the need for uglifyjs

  from dc_theme.settings import get_pipeline_settings
- from dc_theme.settings import STATICFILES_FINDERS
+ from dc_theme.settings import STATICFILES_FINDERS, STATICFILES_STORAGE
- STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage'
  
  PIPELINE = get_pipeline_settings(
      extra_css=[
          'custom_css/style.scss',
          'font-awesome/css/font-awesome.min.css',
      ],
      extra_js=[],
  )
+ 
- PIPELINE['JS_COMPRESSOR'] = 'pipeline.compressors.uglifyjs.UglifyJSCompressor'
- PIPELINE['UGLIFYJS_BINARY'] = 'node_modules/uglify-js/bin/uglifyjs'
  PIPELINE['STYLESHEETS']['map'] = {
      'source_filenames': [
          'leaflet/dist/leaflet.css',
          'custom_css/map.css',
          'leaflet-extra-markers/dist/css/leaflet.extra-markers.min.css',
      ],
      'output_filename': 'css/map.css',
  }
+ 
  PIPELINE['JAVASCRIPT']['map'] = {
      'source_filenames': [
          'leaflet/dist/leaflet.js',
          'leaflet-extra-markers/dist/js/leaflet.extra-markers.min.js',
          '@mapbox/polyline/src/polyline.js',
          'custom_js/polyline_global.js',
          'custom_js/map.js',
      ],
      'output_filename': 'js/map.js',
  }
- COMPRESS_CSS_FILTERS = ['compressor.filters.css_default.CssAbsoluteFilter']
  
Remove old pipeline and compressor settings
## Code Before:
from dc_theme.settings import get_pipeline_settings
from dc_theme.settings import STATICFILES_FINDERS
STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage'

PIPELINE = get_pipeline_settings(
    extra_css=[
        'custom_css/style.scss',
        'font-awesome/css/font-awesome.min.css',
    ],
    extra_js=[],
)
PIPELINE['JS_COMPRESSOR'] = 'pipeline.compressors.uglifyjs.UglifyJSCompressor'
PIPELINE['UGLIFYJS_BINARY'] = 'node_modules/uglify-js/bin/uglifyjs'
PIPELINE['STYLESHEETS']['map'] = {
    'source_filenames': [
        'leaflet/dist/leaflet.css',
        'custom_css/map.css',
        'leaflet-extra-markers/dist/css/leaflet.extra-markers.min.css',
    ],
    'output_filename': 'css/map.css',
}
PIPELINE['JAVASCRIPT']['map'] = {
    'source_filenames': [
        'leaflet/dist/leaflet.js',
        'leaflet-extra-markers/dist/js/leaflet.extra-markers.min.js',
        '@mapbox/polyline/src/polyline.js',
        'custom_js/polyline_global.js',
        'custom_js/map.js',
    ],
    'output_filename': 'js/map.js',
}
COMPRESS_CSS_FILTERS = ['compressor.filters.css_default.CssAbsoluteFilter']

## Instruction:
Remove old pipeline and compressor settings
## Code After:
from dc_theme.settings import get_pipeline_settings
from dc_theme.settings import STATICFILES_FINDERS, STATICFILES_STORAGE

PIPELINE = get_pipeline_settings(
    extra_css=[
        'custom_css/style.scss',
        'font-awesome/css/font-awesome.min.css',
    ],
    extra_js=[],
)

PIPELINE['STYLESHEETS']['map'] = {
    'source_filenames': [
        'leaflet/dist/leaflet.css',
        'custom_css/map.css',
        'leaflet-extra-markers/dist/css/leaflet.extra-markers.min.css',
    ],
    'output_filename': 'css/map.css',
}

PIPELINE['JAVASCRIPT']['map'] = {
    'source_filenames': [
        'leaflet/dist/leaflet.js',
        'leaflet-extra-markers/dist/js/leaflet.extra-markers.min.js',
        '@mapbox/polyline/src/polyline.js',
        'custom_js/polyline_global.js',
        'custom_js/map.js',
    ],
    'output_filename': 'js/map.js',
}
