Skip to content

Commit 6f3ec41

Browse files
committed
Merge branch 'release/0.32.0-beta1'
2 parents 9504495 + b0f0d63 commit 6f3ec41

531 files changed

Lines changed: 138565 additions & 81327 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.babelrc

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
{
2+
"presets": [
3+
["env", {
4+
"targets": {
5+
"browsers": ["last 3 versions", "Chrome >= 41", "Firefox >= 34", "Explorer >= 9", "Safari >= 9"]
6+
},
7+
"exclude": [
8+
"transform-regenerator",
9+
"es6.typed.array-buffer",
10+
"es6.typed.data-view",
11+
"es6.typed.int8-array",
12+
"es6.typed.uint8-array",
13+
"es6.typed.uint8-clamped-array",
14+
"es6.typed.int16-array",
15+
"es6.typed.uint16-array",
16+
"es6.typed.int32-array",
17+
"es6.typed.uint32-array",
18+
"es6.typed.float32-array",
19+
"es6.typed.float64-array",
20+
"es6.reflect.apply",
21+
"es6.reflect.construct",
22+
"es6.reflect.define-property",
23+
"es6.reflect.delete-property",
24+
"es6.reflect.get",
25+
"es6.reflect.get-own-property-descriptor",
26+
"es6.reflect.get-prototype-of",
27+
"es6.reflect.has",
28+
"es6.reflect.is-extensible",
29+
"es6.reflect.own-keys",
30+
"es6.reflect.prevent-extensions",
31+
"es6.reflect.set",
32+
"es6.reflect.set-prototype-of",
33+
"es6.math.acosh",
34+
"es6.math.acosh",
35+
"es6.math.asinh",
36+
"es6.math.atanh",
37+
"es6.math.cbrt",
38+
"es6.math.clz32",
39+
"es6.math.cosh",
40+
"es6.math.expm1",
41+
"es6.math.fround",
42+
"es6.math.hypot",
43+
"es6.math.imul",
44+
"es6.math.log1p",
45+
"es6.math.log10",
46+
"es6.math.log2",
47+
"es6.math.sign",
48+
"es6.math.sinh",
49+
"es6.math.tanh",
50+
"es6.math.tanh",
51+
"es6.math.trunc",
52+
"web.timers"
53+
],
54+
"modules": false,
55+
"debug": false,
56+
"useBuiltIns": true
57+
}]
58+
],
59+
"plugins": [
60+
["transform-object-rest-spread", {"useBuiltIns": true}]
61+
],
62+
"env": {
63+
"commonjs": {
64+
"plugins": [
65+
["transform-es2015-modules-commonjs", {"loose": true}]
66+
]
67+
},
68+
"commonjs_dist": {
69+
"plugins": [
70+
["transform-es2015-modules-commonjs", {"loose": true}],
71+
["babel-plugin-transform-require-ignore", {"extensions": [".css"]}]
72+
]
73+
},
74+
"commonjs_e2e": {
75+
"presets": [
76+
["env", {
77+
"targets": {
78+
"browsers": ["last 3 versions", "Chrome >= 41", "Firefox >= 34", "Explorer >= 9", "Safari >= 9"]
79+
},
80+
"exclude": [
81+
"es6.typed.array-buffer",
82+
"es6.typed.data-view",
83+
"es6.typed.int8-array",
84+
"es6.typed.uint8-array",
85+
"es6.typed.uint8-clamped-array",
86+
"es6.typed.int16-array",
87+
"es6.typed.uint16-array",
88+
"es6.typed.int32-array",
89+
"es6.typed.uint32-array",
90+
"es6.typed.float32-array",
91+
"es6.typed.float64-array",
92+
"es6.reflect.apply",
93+
"es6.reflect.construct",
94+
"es6.reflect.define-property",
95+
"es6.reflect.delete-property",
96+
"es6.reflect.get",
97+
"es6.reflect.get-own-property-descriptor",
98+
"es6.reflect.get-prototype-of",
99+
"es6.reflect.has",
100+
"es6.reflect.is-extensible",
101+
"es6.reflect.own-keys",
102+
"es6.reflect.prevent-extensions",
103+
"es6.reflect.set",
104+
"es6.reflect.set-prototype-of",
105+
"es6.math.acosh",
106+
"es6.math.acosh",
107+
"es6.math.asinh",
108+
"es6.math.atanh",
109+
"es6.math.cbrt",
110+
"es6.math.clz32",
111+
"es6.math.cosh",
112+
"es6.math.expm1",
113+
"es6.math.fround",
114+
"es6.math.hypot",
115+
"es6.math.imul",
116+
"es6.math.log1p",
117+
"es6.math.log10",
118+
"es6.math.log2",
119+
"es6.math.sign",
120+
"es6.math.sinh",
121+
"es6.math.tanh",
122+
"es6.math.tanh",
123+
"es6.math.trunc",
124+
"web.timers"
125+
],
126+
"modules": false,
127+
"debug": false,
128+
"useBuiltIns": true
129+
}]
130+
],
131+
"plugins": [
132+
["transform-es2015-modules-commonjs", {"loose": true}],
133+
["babel-plugin-forbidden-imports", {
134+
"allowedModules": [
135+
"window",
136+
"jasmine-co",
137+
"core-js/*",
138+
"regenerator-runtime/runtime",
139+
"./common",
140+
"./jasmine",
141+
"./MemoryLeakTest"
142+
]
143+
}]
144+
]
145+
},
146+
"es": {
147+
"plugins": [
148+
["babel-plugin-transform-require-ignore", {"extensions": [".css"]}]
149+
]
150+
}
151+
},
152+
"ignore": [
153+
"src/3rdparty/walkontable/dist/*",
154+
"src/3rdparty/walkontable/test/dist/*"
155+
]
156+
}

.config/base.js

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
'use strict';
2+
3+
var ExtractTextPlugin = require('extract-text-webpack-plugin');
4+
var ProgressBarPlugin = require('progress-bar-webpack-plugin');
5+
var path = require('path');
6+
var fs = require('fs');
7+
var webpack = require('webpack');
8+
9+
var licenseBody = fs.readFileSync(path.resolve(__dirname, '../LICENSE'), 'utf8');
10+
var packageBody = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../package.json'), 'utf8'));
11+
12+
var PACKAGE_VERSION = packageBody.version;
13+
var PACKAGE_NAME = packageBody.name;
14+
var BUILD_DATE = new Date();
15+
var BASE_VERSION = void 0;
16+
17+
module.exports.PACKAGE_VERSION = PACKAGE_VERSION;
18+
module.exports.PACKAGE_NAME = PACKAGE_NAME;
19+
module.exports.BUILD_DATE = BUILD_DATE;
20+
module.exports.BASE_VERSION = BASE_VERSION;
21+
22+
licenseBody += '\nVersion: ' + PACKAGE_VERSION;
23+
licenseBody += '\nDate: ' + BUILD_DATE;
24+
25+
module.exports.create = function create(envArgs) {
26+
var config = {
27+
devtool: false,
28+
output: {
29+
library: 'Handsontable',
30+
libraryTarget: 'umd',
31+
umdNamedDefine: true,
32+
path: path.resolve(__dirname, '../dist'),
33+
},
34+
resolve: {
35+
alias: {},
36+
},
37+
module: {
38+
rules: [
39+
{
40+
test: /\.css$/,
41+
loader: ExtractTextPlugin.extract({
42+
fallback: 'style-loader',
43+
use: 'css-loader',
44+
}),
45+
},
46+
{
47+
test: [
48+
// Disable loading languages from numbro and moment into final bundle
49+
/numbro\/languages/,
50+
/moment\/locale/,
51+
],
52+
loader: path.resolve(__dirname, 'loader/empty-loader.js'),
53+
},
54+
{
55+
test: /\.js$/,
56+
loader: 'babel-loader',
57+
exclude: [
58+
/node_modules/,
59+
],
60+
options: {
61+
cacheDirectory: true,
62+
},
63+
},
64+
]
65+
},
66+
plugins: [
67+
new ProgressBarPlugin({
68+
format: ' build [:bar] \u001b[32m:percent\u001b[0m (:elapsed seconds)',
69+
summary: false,
70+
}),
71+
// This helps ensure the builds are consistent if source code hasn't changed
72+
new webpack.optimize.OccurrenceOrderPlugin(),
73+
new webpack.BannerPlugin(licenseBody),
74+
new webpack.DefinePlugin({
75+
'__HOT_VERSION__': JSON.stringify(PACKAGE_VERSION),
76+
'__HOT_PACKAGE_NAME__': JSON.stringify(PACKAGE_NAME),
77+
'__HOT_BUILD_DATE__': JSON.stringify(BUILD_DATE),
78+
'__HOT_BASE_VERSION__': JSON.stringify(BASE_VERSION),
79+
'__ENV_ARGS__': JSON.stringify(envArgs),
80+
}),
81+
],
82+
node: {
83+
global: false,
84+
process: false,
85+
Buffer: false,
86+
setImmediate: false,
87+
},
88+
};
89+
90+
return [config];
91+
}
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
var treeKill = require('tree-kill');
2+
var spawnCommand = require('spawn-command');
3+
var supportsColor = require('supports-color');
4+
5+
var CMD = process.argv[2];
6+
var CMD_TO_TRIGGER = process.argv[3];
7+
8+
var IS_WINDOWS = /^win/.test(process.platform);
9+
var waitForFirstBuild = true;
10+
var triggeredChild;
11+
var delayedTrigger;
12+
13+
setTimeout(function() {
14+
waitForFirstBuild = false;
15+
}, 5000);
16+
17+
run(CMD, CMD_TO_TRIGGER);
18+
19+
function run(commands, commandToTrigger, spawnOpts) {
20+
spawnOpts = spawnOpts || {};
21+
22+
if (IS_WINDOWS) {
23+
spawnOpts.detached = false;
24+
}
25+
spawnOpts.env = Object.assign({FORCE_COLOR: supportsColor.level}, process.env);
26+
27+
var child;
28+
try {
29+
child = spawnCommand(commands, spawnOpts);
30+
} catch(ex) {
31+
console.log('Error occured when executing command: ' + commands);
32+
console.log(ex.stack);
33+
process.exit(1);
34+
}
35+
36+
if (commandToTrigger) {
37+
child.stdout.on('data', function(data) {
38+
if (waitForFirstBuild) {
39+
return;
40+
}
41+
if (triggeredChild) {
42+
treeKill(triggeredChild.pid);
43+
}
44+
if (!delayedTrigger) {
45+
delayedTrigger = debounce(function() {
46+
triggeredChild = run(commandToTrigger);
47+
}, 1000);
48+
}
49+
delayedTrigger();
50+
});
51+
}
52+
53+
child.stdout.pipe(process.stdout);
54+
child.stderr.pipe(process.stderr);
55+
56+
if (commandToTrigger) {
57+
['SIGINT', 'SIGTERM'].forEach(function(signal) {
58+
process.on(signal, function() {
59+
treeKill(child.pid, signal);
60+
});
61+
});
62+
}
63+
64+
return child;
65+
}
66+
67+
function debounce(func, wait) {
68+
var lastTimer = null;
69+
var result;
70+
71+
function _debounce() {
72+
var args = arguments;
73+
74+
if (lastTimer) {
75+
clearTimeout(lastTimer);
76+
}
77+
lastTimer = setTimeout(function() {
78+
result = func.apply(this, args);
79+
}, wait);
80+
81+
return result;
82+
}
83+
84+
return _debounce;
85+
}

0 commit comments

Comments
 (0)