tanmer-js-components
v1.2.0
Published
## 使用文档
Downloads
21
Readme
Tanmer JS Components lib
使用文档
安装
yarn add tanmer-js-components
设置 js loader
因为vue-component-anywhere
和tanmer-js-components
都是用es6语法写的,需要用babel
解释,而默认设置node_modules
目录排除用babel
解释的,因此我们需要在这里加上。
把下面内容存储在config/webpack/loaders/js.js
var { resolve } = require('path');
module.exports = {
test: /\.js?$/,
loader: 'babel-loader',
include: [
resolve('node_modules/vue-component-anywhere/lib'),
resolve('node_modules/tanmer-js-components/src')
]
}
然后在config/webpack/environment.js
中添加下面内容:
const js = require('./loaders/js')
environment.loaders.append('tm-js', js)
开发文档
http://justjs.com/posts/npm-link-developing-your-own-npm-modules-without-tears
npm link
cd dev && npm link tanmer-js-components
退出开发模式:
npm unlink tanmer-js-components