refactor: post-lerna

This commit is contained in:
cha0s 2024-02-10 11:09:21 -06:00
parent 8798073a00
commit 1eff7f4a65
27 changed files with 8 additions and 152 deletions

View File

@ -1 +0,0 @@
module.exports = require('./default.eslint.config')(require('./build').from());

View File

@ -1,8 +0,0 @@
const Build = require('./build');
const configFn = require('./test.webpack.config');
module.exports = async (env, argv) => {
const flecks = await Build.from();
const config = await configFn(env, argv, flecks);
return config;
};

View File

@ -1,17 +0,0 @@
const Build = require('./build');
const configFn = require('./fleck.webpack.config');
const {ProcessAssets, processFleckAssets} = require('./process-assets');
const {executable} = require('./webpack');
module.exports = async (env, argv) => {
const flecks = await Build.from();
const config = await configFn(env, argv, flecks);
config.plugins.push(new ProcessAssets('fleck', flecks));
// Small hack because internals.
flecks.hooks['@flecks/build.processAssets'] = [{
fleck: '@flecks/build',
fn: (target, assets, compilation) => processFleckAssets(assets, compilation),
}];
config.plugins.push(executable());
return config;
};

View File

@ -4,12 +4,10 @@
"author": "cha0s", "author": "cha0s",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"build": "webpack --config ./build/build.webpack.config.js --mode production", "build": "flecks build",
"clean": "rm -rf dist node_modules yarn.lock", "clean": "rm -rf dist node_modules yarn.lock",
"lint": "eslint --config ./build/eslint.config.js .", "lint": "flecks lint",
"postversion": "npm run build", "test": "flecks test"
"test": "webpack --config ./build/build.test.webpack.config.js --mode production && mocha --colors --parallel ./dist/test/*.js ./dist/test/server/*.js",
"test:watch": "webpack watch --config ./build/build.test.webpack.config.js --mode development & mocha --colors --parallel --watch --watch-files ./dist/test/*.js ./dist/test/server/*.js"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -1,74 +0,0 @@
const globals = require('globals');
module.exports = ({
extends: [
require.resolve('eslint-config-airbnb'),
require.resolve('eslint-config-airbnb/hooks'),
],
globals: {
...globals.browser,
...globals.es2021,
...globals.mocha,
...globals.node,
__non_webpack_require__: true,
},
ignorePatterns: [
'dist/**',
// Not even gonna try.
'build/flecks.hooks.js',
],
overrides: [
{
files: [
'build/**/*.js',
],
rules: {
'import/no-extraneous-dependencies': ['error', {devDependencies: true}],
'import/no-dynamic-require': 'off',
'global-require': 'off',
},
},
{
files: [
'test/**/*.js',
],
rules: {
'brace-style': 'off',
'class-methods-use-this': 'off',
'import/no-extraneous-dependencies': 'off',
'import/no-unresolved': 'off',
'max-classes-per-file': 'off',
'no-new': 'off',
'no-unused-expressions': 'off',
'padded-blocks': 'off',
},
},
],
parser: require.resolve('@babel/eslint-parser'),
parserOptions: {
requireConfigFile: false,
},
plugins: ['@babel'],
rules: {
'brace-style': ['error', 'stroustrup'],
// Bug: https://github.com/import-js/eslint-plugin-import/issues/2181
'import/no-import-module-exports': 'off',
'import/prefer-default-export': 'off',
'jsx-a11y/control-has-associated-label': ['error', {assert: 'either'}],
'jsx-a11y/label-has-associated-control': ['error', {assert: 'either'}],
'no-param-reassign': ['error', {props: false}],
'no-plusplus': 'off',
'no-shadow': 'off',
'object-curly-spacing': 'off',
'padded-blocks': ['error', {classes: 'always'}],
yoda: 'off',
},
settings: {
'import/resolver': {
node: {},
},
react: {
version: '18.2.0',
},
},
});

View File

@ -1,15 +0,0 @@
const Build = require('../../build/build/build');
const configFn = require('../../build/build/fleck.webpack.config');
const {ProcessAssets, processFleckAssets} = require('../../build/build/process-assets');
module.exports = async (env, argv) => {
const flecks = await Build.from();
const config = await configFn(env, argv, flecks);
config.plugins.push(new ProcessAssets('fleck', flecks));
// Small hack because internals.
flecks.hooks['@flecks/build.processAssets'] = [{
fleck: '@flecks/build',
fn: (target, assets, compilation) => processFleckAssets(assets, compilation),
}];
return config;
};

View File

@ -1,8 +0,0 @@
const Build = require('../../build/build/build');
const configFn = require('../../build/build/test.webpack.config');
module.exports = async (env, argv) => {
const flecks = await Build.from();
const config = await configFn(env, argv, flecks);
return config;
};

View File

@ -4,12 +4,10 @@
"author": "cha0s", "author": "cha0s",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"build": "webpack --config ./build/core.webpack.config.js --mode production", "build": "flecks build",
"clean": "rm -rf dist node_modules yarn.lock", "clean": "flecks clean",
"lint": "eslint --config ./build/core.eslint.config.js .", "lint": "flecks lint",
"postversion": "npm run build", "test": "flecks test"
"test": "webpack --config ./build/test.webpack.config.js --mode production && mocha --colors --parallel ./dist/test/*.js ./dist/test/server/*.js",
"test:watch": "webpack watch --config ./build/test.webpack.config.js --mode development & mocha --colors --parallel --watch --watch-files ./dist/test/*.js ./dist/test/server/*.js"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -7,7 +7,6 @@
"build": "flecks build", "build": "flecks build",
"clean": "flecks clean", "clean": "flecks clean",
"lint": "flecks lint", "lint": "flecks lint",
"postversion": "npm run build",
"test": "flecks test" "test": "flecks test"
}, },
"repository": { "repository": {

View File

@ -4,7 +4,6 @@
"build": "flecks build", "build": "flecks build",
"clean": "flecks clean", "clean": "flecks clean",
"lint": "flecks lint", "lint": "flecks lint",
"postversion": "npm run build",
"test": "flecks test" "test": "flecks test"
}, },
"files": [ "files": [

View File

@ -7,7 +7,6 @@
"build": "flecks build", "build": "flecks build",
"clean": "flecks clean", "clean": "flecks clean",
"lint": "flecks lint", "lint": "flecks lint",
"postversion": "npm run build",
"test": "flecks test" "test": "flecks test"
}, },
"repository": { "repository": {

View File

@ -7,7 +7,6 @@
"build": "flecks build", "build": "flecks build",
"clean": "flecks clean", "clean": "flecks clean",
"lint": "flecks lint", "lint": "flecks lint",
"postversion": "npm run build",
"test": "flecks test" "test": "flecks test"
}, },
"repository": { "repository": {

View File

@ -7,7 +7,6 @@
"build": "flecks build", "build": "flecks build",
"clean": "flecks clean", "clean": "flecks clean",
"lint": "flecks lint", "lint": "flecks lint",
"postversion": "npm run build",
"test": "flecks test" "test": "flecks test"
}, },
"repository": { "repository": {

View File

@ -7,7 +7,6 @@
"build": "flecks build", "build": "flecks build",
"clean": "flecks clean", "clean": "flecks clean",
"lint": "flecks lint", "lint": "flecks lint",
"postversion": "npm run build",
"test": "flecks test" "test": "flecks test"
}, },
"repository": { "repository": {

View File

@ -7,7 +7,6 @@
"build": "flecks build", "build": "flecks build",
"clean": "flecks clean", "clean": "flecks clean",
"lint": "flecks lint", "lint": "flecks lint",
"postversion": "npm run build",
"test": "flecks test" "test": "flecks test"
}, },
"repository": { "repository": {

View File

@ -7,7 +7,6 @@
"build": "flecks build", "build": "flecks build",
"clean": "flecks clean", "clean": "flecks clean",
"lint": "flecks lint", "lint": "flecks lint",
"postversion": "npm run build",
"test": "flecks test" "test": "flecks test"
}, },
"repository": { "repository": {

View File

@ -7,7 +7,6 @@
"build": "flecks build", "build": "flecks build",
"clean": "flecks clean", "clean": "flecks clean",
"lint": "flecks lint", "lint": "flecks lint",
"postversion": "npm run build",
"test": "flecks test" "test": "flecks test"
}, },
"repository": { "repository": {

View File

@ -7,7 +7,6 @@
"build": "flecks build", "build": "flecks build",
"clean": "flecks clean", "clean": "flecks clean",
"lint": "flecks lint", "lint": "flecks lint",
"postversion": "npm run build",
"postinstall": "node src/fake-context.js", "postinstall": "node src/fake-context.js",
"test": "flecks test" "test": "flecks test"
}, },

View File

@ -7,7 +7,6 @@
"build": "flecks build", "build": "flecks build",
"clean": "flecks clean", "clean": "flecks clean",
"lint": "flecks lint", "lint": "flecks lint",
"postversion": "npm run build",
"test": "flecks test" "test": "flecks test"
}, },
"repository": { "repository": {

View File

@ -7,7 +7,6 @@
"build": "flecks build", "build": "flecks build",
"clean": "flecks clean", "clean": "flecks clean",
"lint": "flecks lint", "lint": "flecks lint",
"postversion": "npm run build",
"test": "flecks test" "test": "flecks test"
}, },
"repository": { "repository": {

View File

@ -7,7 +7,6 @@
"build": "flecks build", "build": "flecks build",
"clean": "flecks clean", "clean": "flecks clean",
"lint": "flecks lint", "lint": "flecks lint",
"postversion": "npm run build",
"test": "flecks test" "test": "flecks test"
}, },
"repository": { "repository": {

View File

@ -7,7 +7,6 @@
"build": "flecks build", "build": "flecks build",
"clean": "flecks clean", "clean": "flecks clean",
"lint": "flecks lint", "lint": "flecks lint",
"postversion": "npm run build",
"test": "flecks test" "test": "flecks test"
}, },
"repository": { "repository": {

View File

@ -7,7 +7,6 @@
"build": "flecks build", "build": "flecks build",
"clean": "flecks clean", "clean": "flecks clean",
"lint": "flecks lint", "lint": "flecks lint",
"postversion": "npm run build",
"test": "flecks test" "test": "flecks test"
}, },
"repository": { "repository": {

View File

@ -7,7 +7,6 @@
"build": "flecks build", "build": "flecks build",
"clean": "flecks clean", "clean": "flecks clean",
"lint": "flecks lint", "lint": "flecks lint",
"postversion": "npm run build",
"test": "flecks test" "test": "flecks test"
}, },
"repository": { "repository": {

View File

@ -7,7 +7,6 @@
"build": "flecks build", "build": "flecks build",
"clean": "flecks clean", "clean": "flecks clean",
"lint": "flecks lint", "lint": "flecks lint",
"postversion": "npm run build",
"test": "flecks test" "test": "flecks test"
}, },
"repository": { "repository": {

@ -1 +1 @@
Subproject commit a353767791b7cff7b47057ec4cfb7651bb12e020 Subproject commit 813bc11d09557e9fb25126ceb7041f130c36551e