How to use cozy-scripts - 2 common examples

To help you get started, we’ve selected a few cozy-scripts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cozy / cozy.github.io / en / cozy-banks / config / webpack.vars.js View on Github external
target,
  addAnalyzer
} = require('cozy-scripts/config/webpack.vars')

const path = require('path')
const production = /:production$/.test(process.env.NODE_ENV)
const hotReload = !!process.env.HOT_RELOAD
const SRC_DIR = path.resolve(__dirname, '../src')

module.exports = {
  production: production,
  target: target,
  hotReload,
  addAnalyzer,
  SRC_DIR,
  enabledFlags: getEnabledFlags()
}
github cozy / cozy.github.io / en / cozy-banks / webpack.config.js View on Github external
loader: 'imports-loader?css=./cozy-bar.css'
      }
    ]
  }
}

const appOnlyConfigs = [
  require('cozy-scripts/config/webpack.config.react'),
  require('cozy-scripts/config/webpack.config.cozy-ui'),
  require('cozy-scripts/config/webpack.config.cozy-ui.react'),
  require('cozy-scripts/config/webpack.config.css-modules'),
  require('cozy-scripts/config/webpack.config.pictures'),
  barConfig
]

const common = mergeAppConfigs(
  [
    require('cozy-scripts/config/webpack.config.eslint'),
    require('cozy-scripts/config/webpack.config.base'),
    ...(target !== 'services' ? appOnlyConfigs : []),
    addAnalyzer ? require('cozy-scripts/config/webpack.config.analyzer') : null,
    require('./config/webpack.config.base'),
    require('./config/webpack.config.manual-resolves'),
    require('./config/webpack.config.plugins'),
    require('cozy-scripts/config/webpack.config.manifest'),
    hotReload ? require(`./config/webpack.config.hot-reload`) : null
  ].filter(Boolean)
)

const targetCfg = require(`./config/webpack.target.${target}`)

const withTarget = merge.strategy({

cozy-scripts

<a href="https://www.npmjs.com/package/cozy-scripts"> <img src="https://img.shields.io/npm/v/cozy-scripts.svg" alt="npm version" /> </a> <a href="https://github.com/CPatchane/create-cozy-app/blob/master/packages/cozy-scripts/LICENSE"> <img src="https:

MIT
Latest version published 11 months ago

Package Health Score

50 / 100
Full package analysis

Similar packages