Answer the question
In order to leave comments, you need to log in
How to build a module for NPM?
There is a class (client js) with a dependency, abstractly, MyPackage.js
import dependence from 'dependence'
export default class MyPackage {
constructor(el) {
this.el = el
this.dependence = dependence
}
}
.my-package
color: red
src
--| MyPackage.js
--| MyPackage.sass
demo
--| index.html
--| index.js
--| import MyPackage from '../src/MyPackage.js'
--| import '../src/MyPackage.sass'
--| new MyPackage()
package.json
webpack.config.js
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question