-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/3.1.0-alpha.0'
- Loading branch information
Showing
25 changed files
with
3,659 additions
and
6,877 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,5 @@ yarn.lock | |
backup/ | ||
*.ini | ||
/packages/demo/dist/ | ||
/packages/demo-basic/dist/ | ||
/packages/*/package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"root": true, | ||
"extends": ["@studiometa/eslint-config"], | ||
"rules": { | ||
"import/extensions": ["error", "always", { "ignorePackages": false }], | ||
"import/no-extraneous-dependencies": "off" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "@studiometa/stylelint-config" | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
module.exports = { | ||
import { createConfig } from '@studiometa/webpack-config'; | ||
|
||
export default createConfig({ | ||
presets: ['prototyping', 'yaml'], | ||
// Exclude the `test.scss` file from the merge | ||
mergeCSS: /^(?!.*css\/test\.scss).*$/, | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,48 @@ | ||
import { cwd } from 'process'; | ||
import webpack from 'webpack'; | ||
import getConfig from './utils/get-config.js'; | ||
import getWebpackConfig from './webpack.prod.config.js'; | ||
|
||
/** | ||
* Build a given Webpack config. | ||
* @param {WebpackConfig} config The Weback configuration object. | ||
* @param {String} name The name of the build. | ||
*/ | ||
async function build(config, name) { | ||
console.log(`Building ${name} bundle in ${config.output.path.replace(cwd(), '.')}...`); | ||
|
||
return new Promise((resolve, reject) => { | ||
webpack(config, (err, stats) => { | ||
if (err) { | ||
console.error(err.message); | ||
reject(err); | ||
return; | ||
} | ||
console.log( | ||
stats.toString({ | ||
...config.stats, | ||
colors: true, | ||
}) | ||
); | ||
console.log(''); | ||
resolve(stats); | ||
}); | ||
}); | ||
} | ||
|
||
export default async (options = {}) => { | ||
process.env.NODE_ENV = 'production'; | ||
|
||
const config = await getConfig(options); | ||
const webpackConfig = await getWebpackConfig(config); | ||
|
||
webpack(webpackConfig, (err, stats) => { | ||
if (err) { | ||
console.error(err.message); | ||
return; | ||
} | ||
console.log( | ||
stats.toString({ | ||
...webpackConfig.stats, | ||
colors: true, | ||
}) | ||
); | ||
}); | ||
if (config.modern) { | ||
process.env.BABEL_ENV = 'modern'; | ||
const modern = await getWebpackConfig(config, { isModern: true }); | ||
await build(modern, 'modern'); | ||
} | ||
|
||
if (config.legacy) { | ||
process.env.BABEL_ENV = 'legacy'; | ||
const legacy = await getWebpackConfig(config, { isLegacy: true }); | ||
await build(legacy, 'legacy'); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.