diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..974597e --- /dev/null +++ b/.babelrc @@ -0,0 +1,28 @@ +{ + "env": { + "rollup": { + "presets": [ + [ + "env", + { + "modules": false + } + ] + ], + "plugins": [ + "transform-class-properties", + "transform-object-rest-spread", + "version" + ] + }, + "babel": { + "presets": ["env"], + "plugins": [ + "transform-class-properties", + "add-module-exports", + "transform-object-rest-spread", + "version" + ] + } + } +} diff --git a/.gitignore b/.gitignore index 3f875d7..1589f73 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .project .settings - +.idea node_modules/* - +*.lock +*.log diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index f2772a8..0000000 --- a/.jshintrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "quotmark": true, - "boss": true, - "eqnull": true, - "expr": true, - "funcscope": true, - "loopfunc": true, - "smarttabs": true, - "node": true, - "browser": true, - "undef": true, - "unused": true -} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index aacd2fb..0000000 --- a/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "4.4.4" \ No newline at end of file diff --git a/README-zh.md b/README-zh.md index ab83bc3..e968cc7 100644 --- a/README-zh.md +++ b/README-zh.md @@ -1,25 +1,39 @@ # canvas-nest.js -> 一个基于html5 canvas绘制的网页背景效果,非常赞!如果需要 `wordpress插件`,在插件库搜索 `canvas-nest` 或者看看项目 [canvas-nest-for-wp](https://github.com/aTool-org/canvas-nest-for-wp)。 +> 一个基于 html5 canvas 绘制的网页背景效果。 -   +[](https://git.hust.cc/canvas-nest.js) +[](https://www.npmjs.com/package/canvas-nest.js) +[](https://www.npmjs.com/package/canvas-nest.js) +[](https://unpkg.com/canvas-nest.js/dist/canvas-nest.js) + + +## 安装 +```sh +# 使用 npm +npm install --save canvas-nest.js + +# 或者使用 yarn +yarn add canvas-nest.js +``` ## 特性 - - 不依赖任何框架或者类库,比如不依赖 jQuery,使用原生的 javascript。 - - 非常小,只有1.6 kb,如果开启 gzip,可以更小。 - - 非常容易实现,配置简单,即使你不是web开发者,也能简单搞定。 + - 不依赖 jQuery,使用原生的 javascript。 + - 非常小,只有 2 Kb。 + - 非常容易实现,配置简单,即使你不是 web 开发者,也能简单搞定。 + - 模块化 & 区域渲染。 ## 使用 -使用非常简单,感觉都没有必要写这一节内容。 + - 快捷使用 将下面的代码插入到 `
和 之间`. ```html - + ``` 强烈建议在 ` ... ... - ... - +