-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Andrew Welch <[email protected]>
- Loading branch information
Showing
55 changed files
with
17,695 additions
and
14,191 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
Empty file.
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,25 @@ | ||
{ | ||
"root": true, | ||
"parser": "vue-eslint-parser", | ||
"parserOptions": { | ||
"parser": "@typescript-eslint/parser", | ||
"ecmaVersion": 2020, | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"@typescript-eslint/no-var-requires": 0 | ||
}, | ||
"env": { | ||
"browser": true, | ||
"amd": true, | ||
"node": true | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:vue/vue3-recommended" | ||
] | ||
} |
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,14 @@ | ||
{ | ||
"extends": "stylelint-config-recommended", | ||
"rules": { | ||
"at-rule-no-unknown": [ true, { | ||
"ignoreAtRules": [ | ||
"screen", | ||
"extends", | ||
"responsive", | ||
"tailwind" | ||
] | ||
}], | ||
"block-no-empty": null | ||
} | ||
} |
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,86 @@ | ||
// node modules | ||
const { merge } = require('webpack-merge'); | ||
|
||
/** | ||
* return a webpack settings file | ||
* @param name string | ||
* @returns {{}} | ||
*/ | ||
const getWebpackSettings = (name) => { | ||
let settings = {}; | ||
try { | ||
settings = require('./webpack-settings/' + name + '.settings.js'); | ||
} catch (e) { | ||
// that's okay | ||
} | ||
|
||
return settings; | ||
}; | ||
|
||
/** | ||
* return a webpack settings file combined with the 'app' settings | ||
* @param name string | ||
* @returns {{}} | ||
*/ | ||
const getCombinedWebpackSettings = (name) => ({ | ||
...getWebpackSettings('app'), | ||
...getWebpackSettings(name), | ||
}); | ||
|
||
/** | ||
* return a legacy webpack config file | ||
* @param name | ||
* @returns {{}} | ||
*/ | ||
const getLegacyWebpackConfig = (name) => require('./webpack-configs/' + name + '.config.js')('legacy', getCombinedWebpackSettings(name)); | ||
|
||
/** | ||
* return a modern webpack config file | ||
* @param name | ||
* @returns {{}} | ||
*/ | ||
const getModernWebpackConfig = (name) => require('./webpack-configs/' + name + '.config.js')('modern', getCombinedWebpackSettings(name)); | ||
|
||
/** | ||
* return an array of webpack configs using the function provided in getWebpackConfig | ||
* @param names string[] | ||
* @param getWebpackConfig function | ||
* @returns {{}} | ||
*/ | ||
const webpackConfigs = (names, getWebpackConfig) => { | ||
let config = {}; | ||
names.forEach((name) => config = merge(config, getWebpackConfig(name))); | ||
|
||
return config; | ||
}; | ||
|
||
/** | ||
* return an array of build webpack configs | ||
* @param names string | ||
* @returns {{}} | ||
*/ | ||
const buildWebpackConfigs = (...names) => webpackConfigs(names, getModernWebpackConfig); | ||
|
||
/** | ||
* return an array of legacy webpack configs | ||
* @param names string | ||
* @returns {{}} | ||
*/ | ||
const legacyWebpackConfigs = (...names) => webpackConfigs(names, getLegacyWebpackConfig); | ||
|
||
/** | ||
* return an array of modern webpack configs | ||
* @param names string | ||
* @returns {{}} | ||
*/ | ||
const modernWebpackConfigs = (...names) => webpackConfigs(names, getModernWebpackConfig); | ||
|
||
// module exports | ||
module.exports = { | ||
getWebpackSettings, | ||
getLegacyWebpackConfig, | ||
getModernWebpackConfig, | ||
buildWebpackConfigs, | ||
legacyWebpackConfigs, | ||
modernWebpackConfigs, | ||
}; |
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 @@ | ||
{ | ||
"watch": [ | ||
"webpack.dev.js", | ||
"webpack-configs/*.js", | ||
"webpack-settings/*.js" | ||
], | ||
"exec": "webpack serve --config webpack.dev.js" | ||
} |
Oops, something went wrong.