metronic-4-color
Advanced tools
Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "metronic-4-color", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "CSS to use colors defined in Metronic 4.", | ||
@@ -11,3 +11,3 @@ "dependencies": {}, | ||
"postcss-loader": "^3.0.0", | ||
"postcss-preset-env": "^5.2.1", | ||
"postcss-preset-env": "^6.0.0", | ||
"sass-loader": "^7.0.3" | ||
@@ -14,0 +14,0 @@ }, |
@@ -14,2 +14,3 @@ /* eslint-env node */ | ||
////////////////// | ||
const argv = require('yargs').argv; | ||
const Encore = require('@symfony/webpack-encore'); | ||
@@ -21,3 +22,7 @@ const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin'); | ||
/////////////// | ||
const baseOutputPath = Encore.isProduction() ? 'dist' : 'dev'; | ||
const minExt = Encore.isProduction() ? '.min' : ''; | ||
const outputPath = argv.outputPath !== undefined ? argv.outputPath : `${baseOutputPath}/`; | ||
const publicPath = argv.publicPath !== undefined ? argv.publicPath : `/${baseOutputPath}`; | ||
let manifestConfig = { sort: (file1, file2) => file1.name.localeCompare(file2.name) }; | ||
@@ -29,5 +34,5 @@ //////////////// | ||
// the project directory where compiled assets will be stored | ||
.setOutputPath('dist/') | ||
.setOutputPath(outputPath) | ||
// the public path used by the web server to access the previous directory | ||
.setPublicPath('/dist') | ||
.setPublicPath(publicPath) | ||
// .cleanupOutputBeforeBuild() | ||
@@ -38,16 +43,23 @@ // .enableSourceMaps(!Encore.isProduction()) | ||
// uncomment if you use Sass/SCSS files | ||
.enableSassLoader((options) => { | ||
.enableSassLoader((options) => Object.assign(options, { | ||
// https://github.com/sass/node-sass#options | ||
Object.assign(options, { | ||
includePaths: [ | ||
path.resolve(__dirname, './node_modules/compass-mixins/lib'), | ||
], | ||
}); | ||
includePaths: [ | ||
path.resolve(__dirname, 'node_modules/compass-mixins/lib'), | ||
], | ||
})) | ||
.enablePostCssLoader((options) => Object.assign(options, { | ||
config: { | ||
path: path.resolve(__dirname, 'postcss.config.js'), | ||
}, | ||
})) | ||
.configureFilenames({ | ||
js: `[name]${minExt}.js`, | ||
css: `[name]${minExt}.css`, | ||
fonts: 'font/[name].[ext]', | ||
images: 'img/[name].[ext]', | ||
}) | ||
.enablePostCssLoader((options) => { | ||
Object.assign(options, { | ||
config: { | ||
path: path.resolve(__dirname, './postcss.config.js'), | ||
}, | ||
}); | ||
.configureManifestPlugin((options) => Object.assign({}, options, manifestConfig)) | ||
.addAliases({ | ||
// use '~' to represent the assets root directory in require() | ||
'~': path.resolve(__dirname, 'src'), | ||
}); | ||
@@ -59,4 +71,4 @@ | ||
Encore | ||
.addStyleEntry('metronic-4-color' + minExt, './src/components/colors.scss') | ||
.addStyleEntry('metronic-4-color-single-border' + minExt, './src/components/colors-single-border.scss'); | ||
.addStyleEntry('metronic-4-color', '~/components/colors.scss') | ||
.addStyleEntry('metronic-4-color-single-border', '~/components/colors-single-border.scss'); | ||
@@ -83,9 +95,9 @@ /////////////////////////////////// | ||
//////////////////////////////////////// | ||
const config = Encore.getWebpackConfig(); | ||
const webpackConfig = Encore.getWebpackConfig(); | ||
/////////////////////////// | ||
// print out full config // | ||
/////////////////////////// | ||
console.log(util.inspect(config, false, null)); | ||
/////////////////////////////////// | ||
// print out full webpack config // | ||
/////////////////////////////////// | ||
console.log(util.inspect(webpackConfig, false, null)); | ||
module.exports = config; | ||
module.exports = webpackConfig; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
446140
3459
1