Skip to content

Commit

Permalink
Merge pull request #225 from connectivedx/ModulesAudit
Browse files Browse the repository at this point in the history
Metrics Enhancements and Razor Modifier
  • Loading branch information
drolsen authored Jul 8, 2020
2 parents a93ce0e + 769364a commit 5d520b2
Show file tree
Hide file tree
Showing 33 changed files with 1,926 additions and 501 deletions.
4 changes: 2 additions & 2 deletions build/configs/css/.csslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"rule-empty-line-before": [ "always", {
"except": ["first-nested"],
"ignore": ["after-comment"]
} ],
"unit-whitelist": ["px", "em", "rem", "%", "deg", "vmin", "vmax", "vw", "vh", "ex", "ch", "in", "pt", "s"]
}],
"unit-whitelist": ["px", "em", "rem", "%", "deg", "vmin", "vmax", "vw", "vh", "ex", "ch", "in", "pt", "s", "ms", "cm", "fr"]
}
}
2 changes: 1 addition & 1 deletion build/configs/css/css.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ module.exports = {
}),
new POSTCSSInOut({
preBuild: [
Plugins.MetricsCSS(), // Captures hoisted up metrics to the Unslated guide tools and examples
imports({ // Bring resolve context to @import / url() usage (see: build/config/alias.config.js)
resolve: (id, basedir) => {
return ResolverFactory.createResolver({
Expand All @@ -66,7 +67,6 @@ module.exports = {
Plugins.media(), // Allows for custom media queries
Plugins.roots(), // Cleans up leftover :root declarations.
Plugins.comments(), // Cleans up comments.
Plugins.MetricsCSS(),
(Package.optimize.css) // Minification of our final CSS results.
? Plugins.minify()
: () => {}
Expand Down
188 changes: 95 additions & 93 deletions build/configs/css/css.config.plugins.js

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion build/configs/js/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"arrow-parens": ["error", "always"],
"camelcase": 0,
"comma-dangle": ["error", "never"],
"guard-for-in": 0,
"import/extensions": 0,
"import/no-extraneous-dependencies": 0,
"import/no-named-as-default": 0,
Expand All @@ -21,6 +22,7 @@
"no-new": 0,
"no-param-reassign": 0,
"no-plusplus": 0,
"no-restricted-syntax": ["off", "forInStatement", "ForOfStatement"],
"no-template-curly-in-string": 0,
"react/destructuring-assignment": 0,
"react/forbid-prop-types": 0,
Expand All @@ -37,7 +39,10 @@
"react/require-default-props": 0,
"react/jsx-props-no-spreading": 0,
"react/static-property-placement": 0,
"react/jsx-fragments": 0
"react/jsx-fragments": 0,
"react/no-unescaped-entities": [ "error", {
"forbid": [">", "}"]
}],
},
"globals": {
"__stats__": true,
Expand Down
11 changes: 10 additions & 1 deletion build/configs/js/js.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ const { ESDocs, JSXDocs, ESMetrics, Bundle } = require('./js.config.plugins.js')
const babelPlugins = [
'@babel/plugin-proposal-object-rest-spread', // (see: https://babeljs.io/docs/en/babel-plugin-transform-object-rest-spread)
'@babel/plugin-proposal-class-properties', // (see: https://babeljs.io/docs/en/babel-plugin-transform-class-properties/)
'@babel/plugin-transform-react-display-name' // (see: https://www.npmjs.com/package/babel-plugin-add-react-displayname)
'@babel/plugin-transform-react-display-name', // (see: https://www.npmjs.com/package/babel-plugin-add-react-displayname)
'@babel/plugin-proposal-nullish-coalescing-operator', // (see: https://babeljs.io/docs/en/babel-plugin-proposal-nullish-coalescing-operator)
'@babel/plugin-proposal-async-generator-functions', // (see: https://babeljs.io/docs/en/babel-plugin-proposal-async-generator-functions)
'@babel/plugin-transform-for-of', // (see: https://babeljs.io/docs/en/babel-plugin-transform-for-of)
'@babel/plugin-proposal-optional-chaining' // (see: https://babeljs.io/docs/en/babel-plugin-proposal-optional-chaining)
];

const babelOptions = {
Expand All @@ -22,6 +26,7 @@ const babelOptions = {
// all js(x) files get ran through these build processes
module.exports = {
config: [{
// Full transpile of JS and JSX files for rendering in browser
'test': /\.(jsx|js)$/,
'exclude': [path.resolve(__dirname, '../../../node_modules')],
'use': [
Expand All @@ -35,12 +40,14 @@ module.exports = {
}
]
}, {
// Pre transpile entry for JS Docs and Metrics building
'test': /\.js$/,
'exclude': [path.resolve(__dirname, '../../../node_modules')],
'use': [
{
'loader': 'babel-loader?cacheDirectory', // (see: https://www.npmjs.com/package/babel-loader)
'options': {
'compact': false,
'plugins': [
ESMetrics,
ESDocs
Expand All @@ -52,12 +59,14 @@ module.exports = {
}
]
}, {
// Pre transpile entry for JSX Docs and Metrics building
'test': /\.jsx$/,
'exclude': [path.resolve(__dirname, '../../../node_modules')],
'use': [
{
'loader': 'babel-loader?cacheDirectory', // (see: https://www.npmjs.com/package/babel-loader)
'options': {
'compact': false,
'presets': ['@babel/preset-react'],
'plugins': [
JSXDocs,
Expand Down
Loading

0 comments on commit 5d520b2

Please sign in to comment.