Skip to content

Commit

Permalink
breaking: [N4S][VEST] rewrite build config
Browse files Browse the repository at this point in the history
  • Loading branch information
ealush committed Oct 23, 2020
1 parent 0859866 commit c64d819
Show file tree
Hide file tree
Showing 36 changed files with 560 additions and 684 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = {
'prettier',
],
globals: {
VEST_VERSION: true,
__LIB_VERSION__: true,
LIBRARY_NAME: true,
ENV_DEVELOPMENT: true,
},
Expand Down
14 changes: 6 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ node_modules
*.log
packages/vest/utilities/
packages/n4s/extended/
packages/n4s/dist

# build artifacts
packages/vest/dist
packages/vest/esm
packages/vest/*.js
packages/vest/*.d.ts
packages/vest/*.cjs
packages/vest/*.mjs
packages/n4s/*.js
packages/*/dist
packages/*/esm
packages/*/*.js
packages/*/*.js.map
packages/*/*.d.ts
packages/*/*.mjs
1 change: 0 additions & 1 deletion config/babel/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ module.exports = api => {
'babel-plugin-add-module-exports',
'@babel/plugin-proposal-optional-chaining',
'@babel/plugin-proposal-nullish-coalescing-operator',
['@babel/plugin-proposal-pipeline-operator', { proposal: 'minimal' }],
api.env('production') && '@babel/plugin-transform-object-assign',
api.env('test') && '@babel/plugin-transform-runtime',
].filter(Boolean);
Expand Down
5 changes: 0 additions & 5 deletions config/builds/index.js

This file was deleted.

8 changes: 0 additions & 8 deletions config/builds/main.js.tmpl

This file was deleted.

70 changes: 0 additions & 70 deletions config/builds/n4s.js

This file was deleted.

142 changes: 0 additions & 142 deletions config/builds/vest.js

This file was deleted.

70 changes: 0 additions & 70 deletions config/builds/vest.utils.js

This file was deleted.

2 changes: 1 addition & 1 deletion config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const { readdirSync } = require('fs');
const path = require('path');
const { PACKAGES_DIR } = require('../shared/constants.js');

const ROOT_PATH = process.cwd();
const ROOT_PATH = path.resolve(__dirname, '..');
const CONFIG_PATH = path.resolve(ROOT_PATH, 'config');
const PACKAGES_PATH = path.resolve(ROOT_PATH, PACKAGES_DIR);
const BABEL_CONFIG_PATH = path.resolve(CONFIG_PATH, 'babel', 'babel.config.js');
Expand Down
15 changes: 15 additions & 0 deletions config/rollup/addEsmDir.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const path = require('path');
const fs = require('fs-extra');

const DIR_ESM = 'esm';

module.exports = DIST_PATH => {
const fullPath = path.join(DIST_PATH, DIR_ESM);

fs.ensureDirSync(fullPath);

fs.writeFileSync(
path.join(fullPath, 'package.json'),
JSON.stringify({ type: 'module' })
);
};
Loading

0 comments on commit c64d819

Please sign in to comment.