Skip to content

Commit

Permalink
adds a build that compiles to es5 on publish
Browse files Browse the repository at this point in the history
  • Loading branch information
phillipskevin committed May 23, 2019
1 parent b700e58 commit e2de8ba
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 8 deletions.
10 changes: 10 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "entry"
}
]
]
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules/
dist/
package-lock.json
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"email": "[email protected]",
"url": "http://bitovi.com"
},
"browserslist": "ie 11",
"bugs": {
"url": "https://github.com/canjs/can-stache-define-element/issues"
},
Expand All @@ -18,6 +19,9 @@
"can-symbol": "^1.6.4"
},
"devDependencies": {
"@babel/cli": "^7.4.4",
"@babel/core": "^7.4.5",
"@babel/preset-env": "^7.4.5",
"detect-cyclic-packages": "^1.1.0",
"fixpack": "^2.3.1",
"http-server": "^0.11.1",
Expand All @@ -32,18 +36,20 @@
"CanJS"
],
"license": "MIT",
"main": "can-stache-define-element.js",
"main": "dist/can-stache-define-element.js",
"repository": {
"type": "git",
"url": "git://github.com/canjs/can-stache-define-element.git"
},
"scripts": {
"ci": "npm run test && node test/test-saucelabs.js",
"compile-to-es5": "babel src --out-dir dist",
"detect-cycle": "detect-cyclic-packages",
"http-server": "http-server -p 3000 --silent",
"jshint": "jshint ./*.js src/*.js test/*.js --config",
"jshint": "jshint src/*.js test/*.js --config",
"lint": "fixpack && npm run jshint",
"postversion": "git push --follow-tags",
"prepublishOnly": "npm run compile-to-es5",
"preversion": "npm test",
"test": "npm run detect-cycle && npm run lint && npm run testee",
"testee": "testee test/test.html --browsers firefox"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const QUnit = require("steal-qunit");
const StacheDefineElement = require("./can-stache-define-element");
const browserSupports = require("./test/browser-supports");
const browserSupports = require("../test/browser-supports");

QUnit.module("can-stache-define-element");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"use strict";

const mixinLifecycleMethods = require("./src/mixin-lifecycle-methods");
const mixinDefine = require("./src/mixin-define");
const mixinStacheView = require("./src/mixin-stache-view");
const mixinViewModelSymbol = require("./src/mixin-viewmodel-symbol");
const mixinLifecycleMethods = require("./mixin-lifecycle-methods");
const mixinDefine = require("./mixin-define");
const mixinStacheView = require("./mixin-stache-view");
const mixinViewModelSymbol = require("./mixin-viewmodel-symbol");

function DeriveElement(BaseElement = HTMLElement) {
return class StacheDefineElement extends
Expand Down
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "../can-stache-define-element-test";
import "../src/can-stache-define-element-test";
import "../src/mixin-define-test";
import "../src/mixin-lifecycle-methods-test";
import "../src/mixin-stache-view-test";
Expand Down

0 comments on commit e2de8ba

Please sign in to comment.