Hi. I’m trying to use copycat-brunch to copy assets from node_modules(‘semantic-ui-css’) to phoenix assets.
But strangely only the “images” folder isn’t copied to. I’m confusing of this, and considering using the npm hookup “postinstall” instead.
This is the codes from brunch-config.js. Help me finding where’s the problem.
Thanks.
exports.config = {
files: {
javascripts: {
joinTo: {
'js/app.js': /^js/, // all code from 'js/',
'js/vendor.js': /^(?!app)/ // all BUT app code - 'vendor/', 'node_modules/', etc
},
order: {
// [before] -> [bower] -> [vendor] -> [everything else] -> [after]
before: ['jquery', 'semantic-ui-css']
}
},
stylesheets: {
joinTo: "css/app.css",
order: {
after: ["priv/static/css/app.scss"] // concat app.css last
}
},
templates: {
joinTo: 'js/app.js'
}
},
conventions: {
assets: /^(static)/
},
// Phoenix paths configuration
paths: {
watched: ["static", "css", "js", "vendor"],
public: "../priv/static"
},
plugins: {
babel: {
// Do not use ES6 compiler in vendor code
ignore: [/vendor/]
},
copycat: {
"fonts": ["node_modules/semantic-ui-css/themes/default/assets/fonts"],
"images": ["node_modules/semantic-ui-css/themes/default/assets/images"],
verbose: true
}
},
modules: {
autoRequire: {
'js/app.js': ['js/app']
}
},
npm: {
styles: {
'semantic-ui-css': ['semantic.min.css'],
'semantic-ui-calendar': ['dist/calendar.min.css']
},
globals: {
$: 'jquery',
jQuery: 'jquery'
}
}
};