🚧 Updated dependencies, added Design
This commit is contained in:
parent
fff45cb0a5
commit
814d8542b2
4 changed files with 907 additions and 3091 deletions
3942
package-lock.json
generated
3942
package-lock.json
generated
File diff suppressed because it is too large
Load diff
12
package.json
12
package.json
|
@ -57,7 +57,6 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.3.3",
|
||||
"@babel/plugin-external-helpers": "7.2.0",
|
||||
"@babel/preset-env": "7.3.1",
|
||||
"babel-eslint": "^8.2.6",
|
||||
"babel-plugin-istanbul": "4.1.6",
|
||||
|
@ -92,19 +91,8 @@
|
|||
],
|
||||
"babel": {
|
||||
"env": {
|
||||
"develop": {
|
||||
"plugins": [
|
||||
"@babel/plugin-external-helpers"
|
||||
]
|
||||
},
|
||||
"production": {
|
||||
"plugins": [
|
||||
"@babel/plugin-external-helpers"
|
||||
]
|
||||
},
|
||||
"test": {
|
||||
"plugins": [
|
||||
"@babel/plugin-external-helpers",
|
||||
"istanbul"
|
||||
]
|
||||
}
|
||||
|
|
10
rollup.js
10
rollup.js
|
@ -15,11 +15,11 @@ export default {
|
|||
commonjs(),
|
||||
babel({
|
||||
exclude: "node_modules/**"
|
||||
}),
|
||||
terser({
|
||||
output: {
|
||||
preamble: `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */`
|
||||
}
|
||||
})
|
||||
//terser({
|
||||
// output: {
|
||||
// preamble: `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */`
|
||||
// }
|
||||
//})
|
||||
]
|
||||
};
|
||||
|
|
34
src/index.js
34
src/index.js
|
@ -7,26 +7,26 @@ import * as utils from "./utils";
|
|||
|
||||
import { version } from "../package.json";
|
||||
|
||||
const create = function(config, plugins = false) {
|
||||
const pattern = function(settings) {
|
||||
Pattern.call(this, config);
|
||||
if (Array.isArray(plugins)) for (let plugin of plugins) this.use(plugin);
|
||||
if (plugins) this.use(plugins);
|
||||
this.apply(settings);
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
// Set up inheritance
|
||||
pattern.prototype = Object.create(Pattern.prototype);
|
||||
pattern.prototype.constructor = pattern;
|
||||
|
||||
return pattern;
|
||||
};
|
||||
//const create = function(config, plugins = false) {
|
||||
// const pattern = function(settings) {
|
||||
// Pattern.call(this, config);
|
||||
// if (Array.isArray(plugins)) for (let plugin of plugins) this.use(plugin);
|
||||
// if (plugins) this.use(plugins);
|
||||
// this.apply(settings);
|
||||
//
|
||||
// return this;
|
||||
// };
|
||||
//
|
||||
// // Set up inheritance
|
||||
// pattern.prototype = Object.create(Pattern.prototype);
|
||||
// pattern.prototype.constructor = pattern;
|
||||
//
|
||||
// return pattern;
|
||||
//};
|
||||
|
||||
export default {
|
||||
version: version,
|
||||
create,
|
||||
// create,
|
||||
Design,
|
||||
Pattern,
|
||||
Point,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue