| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- import process from 'process';
- /**
- * Configuration for the build process
- *
- * Distinction of development and production builds is made by user-provided node environment variable
- * By default, the development target will be built
- *
- * development: `gulp ...`
- * production: `NODE_ENV=production gulp ...`
- *
- * Additionally, if the web app has access to an API, the distinction between 'online' and 'offline' modes
- * is made by user-provided command line argument
- * If no argument is given, the 'online' version will be built
- *
- * development / offline: `gulp --api-mode=offline`
- */
- export default {
- currentTarget: process.env.NODE_ENV || 'development',
- currentMode: 'offline', // There is no online mode available for this module
- targets: {
- development: {
- delimiter: '',
- infix: ''
- },
- production: {
- delimiter: '.',
- infix: 'min'
- }
- },
- modes: {
- offline: {
- delimiter: '',
- infix: ''
- }
- },
- // .eslintcr.yml is not being read?
- eslint: {
- development: {
- rules: {
- 'no-console': 0,
- 'no-warning-comments': 0
- },
- plugins: [ 'react' ]
- },
- production: {
- rules: {
- 'no-console': 1,
- 'no-warning-comments': [ 1, { terms: [ 'todo', 'fixme' ], location: 'start' } ]
- },
- plugins: [ 'react' ]
- }
- },
- // htmlhint configuration
- htmlhintrc: '.htmlhintrc',
- // gulp-sass configuration
- sass: {
- development: {
- outputStyle: 'nested'
- },
- production: {
- outputStyle: 'nested',
- sourceMap: false
- }
- },
- fileNames: {
- css: 'main',
- html: 'index',
- js: 'main',
- jsx: 'main'
- },
- paths: {
- src: 'src',
- dest: 'public',
- assets: 'assets',
- css: 'css',
- fonts: 'fonts',
- html: 'html',
- js: 'js',
- images: 'img',
- sass: 'scss',
- sprites: 'sprites'
- },
- // browsersync configuration
- server: {
- baseDir: './public/',
- index: 'index.html'
- },
- logLevel: 'silent'
- };
|