Skip to content

Commit

Permalink
Merge pull request #500 from visionmedia/es
Browse files Browse the repository at this point in the history
Adds an ES module
  • Loading branch information
matthewp committed Sep 6, 2018
2 parents 71bb2d8 + baa8322 commit d4fe9c1
Show file tree
Hide file tree
Showing 3 changed files with 1,147 additions and 2 deletions.
9 changes: 8 additions & 1 deletion Makefile
@@ -1,14 +1,21 @@
ROLLUP=node_modules/.bin/rollup
INFOLOG := \033[34m ▸\033[0m

all: page.js page.mjs
.PHONY: all

page.js: index.js
@echo "$(INFOLOG) Building page.js.."
@$(ROLLUP) -c rollup.config.js

page.mjs: index.js
@echo "$(INFOLOG) Building page.mjs.."
@$(ROLLUP) -c rollup.config.js -f es -o $@

watch:
find index.js | entr make page.js
.PHONY: watch

clean:
@rm page.js
@rm page.js page.mjs
.PHONY: clean
5 changes: 4 additions & 1 deletion package.json
Expand Up @@ -12,7 +12,9 @@
"page": "index.js"
}
},
"main": "index.js",
"browser": "page.js",
"module": "page.mjs",
"scripts": {
"engine-deps": "install-engine-dependencies",
"test": "jshint index.js test/tests.js && mocha test/tests.js",
Expand Down Expand Up @@ -51,6 +53,7 @@
},
"files": [
"index.js",
"page.js"
"page.js",
"page.mjs"
]
}

0 comments on commit d4fe9c1

Please sign in to comment.