mirror of
https://github.com/WhitestormJS/whs.js.git
synced 2026-01-25 16:08:01 +00:00
Update modules build config
This commit is contained in:
parent
f65f7a9039
commit
9e574ecc58
85235
build/whs.js
85235
build/whs.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1240
build/whs.min.js
vendored
1240
build/whs.min.js
vendored
File diff suppressed because one or more lines are too long
4341
build/whs.module.js
4341
build/whs.module.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
44
modules/.babelrc.js
Normal file
44
modules/.babelrc.js
Normal file
@ -0,0 +1,44 @@
|
||||
/* Built for whs v2.2.0-beta.0 */
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
|
||||
typeof define === 'function' && define.amd ? define(factory) :
|
||||
(factory());
|
||||
}(this, (function () { 'use strict';
|
||||
|
||||
module.exports = {
|
||||
presets: [['@babel/preset-env', {
|
||||
'targets': {
|
||||
browsers: ['last 2 versions', 'safari >= 7']
|
||||
},
|
||||
modules: false
|
||||
}]],
|
||||
plugins: ['@babel/plugin-external-helpers', // ['@babel/plugin-transform-runtime', {
|
||||
// polyfill: false,
|
||||
// regenerator: true
|
||||
// }],
|
||||
'@babel/plugin-proposal-class-properties', ['@babel/plugin-proposal-decorators', {
|
||||
legacy: true
|
||||
}], '@babel/plugin-transform-async-to-generator'] // env: {
|
||||
// test: {
|
||||
// presets: [
|
||||
// ['@babel/preset-env', {
|
||||
// targets: {
|
||||
// node: 'current'
|
||||
// },
|
||||
// modules: 'commonjs',
|
||||
// useBuiltIns: false,
|
||||
// debug: false
|
||||
// }]
|
||||
// ],
|
||||
// plugins: [
|
||||
// ['@babel/plugin-transform-runtime', {
|
||||
// polyfill: false
|
||||
// }]
|
||||
// ]
|
||||
// },
|
||||
// }
|
||||
|
||||
};
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=.babelrc.js.map
|
||||
1
modules/.babelrc.js.map
Normal file
1
modules/.babelrc.js.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":".babelrc.js","sources":["../src/modules/extra/.babelrc.js"],"sourcesContent":["module.exports = {\n presets: [\n ['@babel/preset-env', {\n 'targets': {\n browsers: ['last 2 versions', 'safari >= 7']\n },\n modules: false\n }]\n ],\n plugins: [\n '@babel/plugin-external-helpers',\n // ['@babel/plugin-transform-runtime', {\n // polyfill: false,\n // regenerator: true\n // }],\n '@babel/plugin-proposal-class-properties',\n ['@babel/plugin-proposal-decorators', {\n legacy: true\n }],\n '@babel/plugin-transform-async-to-generator'\n ]\n // env: {\n // test: {\n // presets: [\n // ['@babel/preset-env', {\n // targets: {\n // node: 'current'\n // },\n // modules: 'commonjs',\n // useBuiltIns: false,\n // debug: false\n // }]\n // ],\n // plugins: [\n // ['@babel/plugin-transform-runtime', {\n // polyfill: false\n // }]\n // ]\n // },\n // }\n}\n"],"names":["module","exports","presets","browsers","modules","plugins","legacy"],"mappings":";;;;;;;EAAAA,OAAOC,OAAP,GAAiB;EACfC,WAAS,CACP,CAAC,mBAAD,EAAsB;EACpB,eAAW;EACTC,gBAAU,CAAC,iBAAD,EAAoB,aAApB;EADD,KADS;EAIpBC,aAAS;EAJW,GAAtB,CADO,CADM;EASfC,WAAS,CACP,gCADO;EAGP;EACA;EACA;EACA,2CANO,EAOP,CAAC,mCAAD,EAAsC;EACpCC,YAAQ;EAD4B,GAAtC,CAPO,EAUP,4CAVO,CATM;EAsBf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAvCe,CAAjB;;;;"}
|
||||
36
modules/.babelrc.module.js
Normal file
36
modules/.babelrc.module.js
Normal file
@ -0,0 +1,36 @@
|
||||
/* Built for whs v2.2.0-beta.0 */
|
||||
module.exports = {
|
||||
presets: [['@babel/preset-env', {
|
||||
'targets': {
|
||||
browsers: ['last 2 versions', 'safari >= 7']
|
||||
},
|
||||
modules: false
|
||||
}]],
|
||||
plugins: ['@babel/plugin-external-helpers', // ['@babel/plugin-transform-runtime', {
|
||||
// polyfill: false,
|
||||
// regenerator: true
|
||||
// }],
|
||||
'@babel/plugin-proposal-class-properties', ['@babel/plugin-proposal-decorators', {
|
||||
legacy: true
|
||||
}], '@babel/plugin-transform-async-to-generator'] // env: {
|
||||
// test: {
|
||||
// presets: [
|
||||
// ['@babel/preset-env', {
|
||||
// targets: {
|
||||
// node: 'current'
|
||||
// },
|
||||
// modules: 'commonjs',
|
||||
// useBuiltIns: false,
|
||||
// debug: false
|
||||
// }]
|
||||
// ],
|
||||
// plugins: [
|
||||
// ['@babel/plugin-transform-runtime', {
|
||||
// polyfill: false
|
||||
// }]
|
||||
// ]
|
||||
// },
|
||||
// }
|
||||
|
||||
};
|
||||
//# sourceMappingURL=.babelrc.module.js.map
|
||||
1
modules/.babelrc.module.js.map
Normal file
1
modules/.babelrc.module.js.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":".babelrc.module.js","sources":["../src/modules/extra/.babelrc.js"],"sourcesContent":["module.exports = {\n presets: [\n ['@babel/preset-env', {\n 'targets': {\n browsers: ['last 2 versions', 'safari >= 7']\n },\n modules: false\n }]\n ],\n plugins: [\n '@babel/plugin-external-helpers',\n // ['@babel/plugin-transform-runtime', {\n // polyfill: false,\n // regenerator: true\n // }],\n '@babel/plugin-proposal-class-properties',\n ['@babel/plugin-proposal-decorators', {\n legacy: true\n }],\n '@babel/plugin-transform-async-to-generator'\n ]\n // env: {\n // test: {\n // presets: [\n // ['@babel/preset-env', {\n // targets: {\n // node: 'current'\n // },\n // modules: 'commonjs',\n // useBuiltIns: false,\n // debug: false\n // }]\n // ],\n // plugins: [\n // ['@babel/plugin-transform-runtime', {\n // polyfill: false\n // }]\n // ]\n // },\n // }\n}\n"],"names":["module","exports"],"mappings":";AAAAA,OAAOC,OAAP,GAAiB;WACN,CACP,CAAC,mBAAD,EAAsB;eACT;gBACC,CAAC,iBAAD,EAAoB,aAApB;KAFQ;aAIX;GAJX,CADO,CADM;WASN,CACP,gCADO;;;;2CAAA,EAOP,CAAC,mCAAD,EAAsC;YAC5B;GADV,CAPO,EAUP,4CAVO,CATM;;;;;;;;;;;;;;;;;;;;CAAjB"}
|
||||
43080
modules/AudioModule.js
43080
modules/AudioModule.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
48582
modules/DatGUIModule.js
48582
modules/DatGUIModule.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
43037
modules/DragModule.js
43037
modules/DragModule.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
52346
modules/VRKit.js
52346
modules/VRKit.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
52234
modules/VRKit.module.js
52234
modules/VRKit.module.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "whs",
|
||||
"version": "2.2.0-alpha.0",
|
||||
"version": "2.2.0-beta.0",
|
||||
"description": "Super-fast 3D framework for Web Applications & Games. Based on Three.js",
|
||||
"main": "build/whs.js",
|
||||
"jsnext:main": "build/whs.module.js",
|
||||
|
||||
@ -30,6 +30,7 @@ export default {
|
||||
name: 'WHS',
|
||||
sourcemap: true,
|
||||
file: 'build/whs.js',
|
||||
external: ['three'],
|
||||
banner: `/* WhitestormJS Framework v${require('./package.json').version} */`
|
||||
}, {
|
||||
format: 'es',
|
||||
@ -50,7 +51,8 @@ export default {
|
||||
}),
|
||||
babelFix(
|
||||
babel({
|
||||
runtimeHelpers: true
|
||||
runtimeHelpers: true,
|
||||
sourceMap: true
|
||||
})
|
||||
),
|
||||
commonjs({include: 'node_modules/**', ignoreGlobal: true}),
|
||||
|
||||
@ -9,33 +9,9 @@ module.exports = {
|
||||
],
|
||||
plugins: [
|
||||
'@babel/plugin-external-helpers',
|
||||
['@babel/plugin-transform-runtime', {
|
||||
polyfill: false,
|
||||
regenerator: true
|
||||
}],
|
||||
'@babel/plugin-proposal-class-properties',
|
||||
['@babel/plugin-proposal-decorators', {
|
||||
legacy: true
|
||||
}],
|
||||
'@babel/plugin-transform-async-to-generator'
|
||||
],
|
||||
env: {
|
||||
test: {
|
||||
presets: [
|
||||
['@babel/preset-env', {
|
||||
targets: {
|
||||
node: 'current'
|
||||
},
|
||||
modules: 'commonjs',
|
||||
useBuiltIns: false,
|
||||
debug: false
|
||||
}]
|
||||
],
|
||||
plugins: [
|
||||
['@babel/plugin-transform-runtime', {
|
||||
polyfill: false
|
||||
}]
|
||||
]
|
||||
},
|
||||
}
|
||||
}]
|
||||
]
|
||||
}
|
||||
|
||||
@ -1,20 +0,0 @@
|
||||
{
|
||||
"presets": [
|
||||
["latest", {
|
||||
"es2015": {
|
||||
"modules": false
|
||||
}
|
||||
}]
|
||||
],
|
||||
"plugins": [
|
||||
"external-helpers",
|
||||
"transform-decorators-legacy",
|
||||
"transform-class-properties",
|
||||
"transform-object-rest-spread"
|
||||
],
|
||||
"env": {
|
||||
"test": {
|
||||
"plugins": ["transform-es2015-modules-commonjs"]
|
||||
},
|
||||
}
|
||||
}
|
||||
41
src/modules/extra/.babelrc.js
Normal file
41
src/modules/extra/.babelrc.js
Normal file
@ -0,0 +1,41 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
['@babel/preset-env', {
|
||||
'targets': {
|
||||
browsers: ['last 2 versions', 'safari >= 7']
|
||||
},
|
||||
modules: false
|
||||
}]
|
||||
],
|
||||
plugins: [
|
||||
'@babel/plugin-external-helpers',
|
||||
// ['@babel/plugin-transform-runtime', {
|
||||
// polyfill: false,
|
||||
// regenerator: true
|
||||
// }],
|
||||
'@babel/plugin-proposal-class-properties',
|
||||
['@babel/plugin-proposal-decorators', {
|
||||
legacy: true
|
||||
}],
|
||||
'@babel/plugin-transform-async-to-generator'
|
||||
]
|
||||
// env: {
|
||||
// test: {
|
||||
// presets: [
|
||||
// ['@babel/preset-env', {
|
||||
// targets: {
|
||||
// node: 'current'
|
||||
// },
|
||||
// modules: 'commonjs',
|
||||
// useBuiltIns: false,
|
||||
// debug: false
|
||||
// }]
|
||||
// ],
|
||||
// plugins: [
|
||||
// ['@babel/plugin-transform-runtime', {
|
||||
// polyfill: false
|
||||
// }]
|
||||
// ]
|
||||
// },
|
||||
// }
|
||||
}
|
||||
51677
src/modules/extra/build/whs.js
Normal file
51677
src/modules/extra/build/whs.js
Normal file
File diff suppressed because one or more lines are too long
1
src/modules/extra/build/whs.js.map
Normal file
1
src/modules/extra/build/whs.js.map
Normal file
File diff suppressed because one or more lines are too long
51664
src/modules/extra/build/whs.module.js
Normal file
51664
src/modules/extra/build/whs.module.js
Normal file
File diff suppressed because one or more lines are too long
1
src/modules/extra/build/whs.module.js.map
Normal file
1
src/modules/extra/build/whs.module.js.map
Normal file
File diff suppressed because one or more lines are too long
2044
src/modules/extra/package-lock.json
generated
2044
src/modules/extra/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -4,24 +4,26 @@
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "del ../../../modules/*.js !../../../modules/*.config.js --force && rollup -c rollup.modules.config.js",
|
||||
"build": "del ../../../modules/*.js ../../../modules/*.map --force && rollup -c rollup.modules.config.js",
|
||||
"start": "rollup -c rollup.modules.config.js -w -m inline"
|
||||
},
|
||||
"author": "Alexander Buzin",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"babel": "^6.23.0",
|
||||
"babel-plugin-add-module-exports": "^0.2.1",
|
||||
"babel-plugin-external-helpers": "^6.22.0",
|
||||
"babel-plugin-transform-class-properties": "^6.24.1",
|
||||
"babel-plugin-transform-decorators-legacy": "^1.3.4",
|
||||
"babel-plugin-transform-es2015-modules-commonjs": "^6.24.1",
|
||||
"babel-plugin-transform-object-rest-spread": "^6.23.0",
|
||||
"@babel/core": "^7.0.0-beta.49",
|
||||
"@babel/plugin-external-helpers": "^7.0.0-beta.49",
|
||||
"@babel/plugin-proposal-class-properties": "^7.0.0-beta.49",
|
||||
"@babel/plugin-proposal-decorators": "^7.0.0-beta.49",
|
||||
"@babel/plugin-transform-async-to-generator": "^7.0.0-beta.49",
|
||||
"@babel/register": "^7.0.0-beta.49",
|
||||
"babel-core": "^7.0.0-bridge.0",
|
||||
"dat-gui": "^0.5.0",
|
||||
"dat.gui": "^0.6.1",
|
||||
"del-cli": "^1.1.0",
|
||||
"fps": "0.0.3",
|
||||
"minivents": "^2.1.0",
|
||||
"rollup-plugin-babel": "^2.7.1",
|
||||
"rollup": "^0.59.4",
|
||||
"rollup-plugin-babel": "^4.0.0-beta.0",
|
||||
"rollup-plugin-commonjs": "^8.0.2",
|
||||
"rollup-plugin-json": "^2.3.0",
|
||||
"rollup-plugin-node-resolve": "^3.0.0",
|
||||
|
||||
@ -6,16 +6,22 @@ import commonjs from 'rollup-plugin-commonjs';
|
||||
import babel from 'rollup-plugin-babel';
|
||||
|
||||
const configure = (moduleName = 'file') => ({
|
||||
entry: `${moduleName}.js`,
|
||||
format: 'umd',
|
||||
moduleName,
|
||||
banner: `/* Built for whs v${require('../../../package.json').version} */`,
|
||||
sourceMap: true,
|
||||
input: `${moduleName}.js`,
|
||||
|
||||
external: [
|
||||
'three',
|
||||
'whs'
|
||||
],
|
||||
output: [{
|
||||
format: 'umd',
|
||||
name: moduleName,
|
||||
sourcemap: true,
|
||||
file: path.resolve(__dirname, `../../../modules/${moduleName}.js`),
|
||||
external: ['three', 'whs'],
|
||||
banner: `/* Built for whs v${require('../../../package.json').version} */`
|
||||
}, {
|
||||
format: 'es',
|
||||
sourcemap: true,
|
||||
file: path.resolve(__dirname, `../../../modules/${moduleName}.module.js`),
|
||||
external: ['three', 'whs'],
|
||||
banner: `/* Built for whs v${require('../../../package.json').version} */`
|
||||
}],
|
||||
|
||||
globals: {
|
||||
three: 'THREE',
|
||||
@ -23,35 +29,31 @@ const configure = (moduleName = 'file') => ({
|
||||
},
|
||||
|
||||
plugins: [
|
||||
resolve({jsnext: true, main: true}),
|
||||
resolve({
|
||||
jsnext: true,
|
||||
module: true
|
||||
}),
|
||||
commonjs({include: 'node_modules/**'}),
|
||||
babel({
|
||||
exclude: [
|
||||
'node_modules/**',
|
||||
'*.json'
|
||||
],
|
||||
// ...require('./.babelrc.js'),
|
||||
// runtimeHelpers: true,
|
||||
sourceMap: true
|
||||
}),
|
||||
],
|
||||
|
||||
targets: [
|
||||
{
|
||||
dest: `../../../modules/${moduleName}.js`
|
||||
},
|
||||
{
|
||||
format: 'es',
|
||||
dest: `../../../modules/${moduleName}.module.js`
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
function buildConfiguration() {
|
||||
const config = [];
|
||||
|
||||
const exclude = (file) => !(file === 'package.json' || file === 'package-lock.json' || file === 'rollup.modules.config.js');
|
||||
const exclude = (file) =>
|
||||
/(\.json$|\.config\.js$|\.babel\.?rc)/.test(file);
|
||||
|
||||
fs.readdirSync('./').forEach(file => {
|
||||
if (file.indexOf('.js') > 0 && exclude(file)) {
|
||||
if (file.indexOf('.js') > 0 && !exclude(file)) {
|
||||
config.push(configure(file.replace('.js', '')));
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user