Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECMAScript support #212

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
2 changes: 0 additions & 2 deletions .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

module.exports = {
root: true,
extends: ['eslint:recommended', 'plugin:prettier/recommended'],
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ logs
npm-debug.log*

dist
lib
es
.DS_Store

Expand Down
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ node_js:
- 14
- 13
- 12
- 10
script:
- npm test
after_script:
Expand Down
1 change: 0 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ environment:
- nodejs_version: 14
- nodejs_version: 13
- nodejs_version: 12
- nodejs_version: 10
install:
- ps: Install-Product node $env:nodejs_version
- set CI=true
Expand Down
2 changes: 1 addition & 1 deletion contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
1. Fork this repository
2. `git clone` your fork down to your local machine
3. `cd` into the directory for your fork
4. run `npm install`
4. run `npm ci`

## Tests

Expand Down
4 changes: 1 addition & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
'use strict';

module.exports = {
export default {
collectCoverage: true,
coverageDirectory: './coverage/',
testEnvironment: 'node',
Expand Down
3,611 changes: 2,664 additions & 947 deletions package-lock.json

Large diffs are not rendered by default.

41 changes: 19 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,34 @@
"Rafał Ruciński (https://github.com/fatfisz)"
],
"devDependencies": {
"@babel/cli": "^7.10.1",
"@babel/core": "^7.10.2",
"@babel/plugin-proposal-class-properties": "^7.10.1",
"@babel/plugin-proposal-export-default-from": "^7.10.1",
"@babel/preset-env": "^7.10.2",
"@rollup/plugin-babel": "^5.0.2",
"@babel/cli": "^7.12.10",
"@babel/core": "^7.12.10",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/plugin-proposal-export-default-from": "^7.12.1",
"@babel/preset-env": "^7.12.11",
"@rollup/plugin-babel": "^5.2.3",
"@rollup/plugin-node-resolve": "^8.0.0",
"babel-core": "^6.26.3",
"babel-eslint": "^10.1.0",
"babel-plugin-add-module-exports": "^1.0.2",
"babel-plugin-add-module-exports": "^1.0.4",
"codecov": "^3.7.0",
"cross-env": "^7.0.2",
"cross-env": "^7.0.3",
"doctoc": "^1.4.0",
"eslint": "^7.1.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.3",
"eslint": "^7.18.0",
"eslint-config-prettier": "^7.2.0",
"eslint-plugin-prettier": "^3.3.1",
"jest": "^26.0.1",
"micromatch": "^4.0.2",
"prettier": "^2.0.5",
"rimraf": "^3.0.2",
"rollup": "^2.12.0",
"rollup": "^2.38.1",
"rollup-plugin-uglify": "^6.0.4"
},
"directories": {
"lib": "lib"
},
"engines": {
"node": ">=10.0.0"
"node": ">=12.0.0"
},
"homepage": "https://github.com/declandewet/common-tags",
"keywords": [
Expand Down Expand Up @@ -73,28 +73,25 @@
"template"
],
"license": "MIT",
"main": "lib",
"jsnext:main": "es",
"module": "es",
"type": "module",
"exports": "./es/index.js",
"unpkg": "dist/common-tags.min.js",
"files": [
"/dist",
"/es",
"/lib"
"/es"
],
"repository": {
"type": "git",
"url": "https://github.com/declandewet/common-tags"
},
"scripts": {
"clear": "rimraf lib && rimraf es && rimraf dist",
"build": "npm run clear && npm run build:cjs && npm run build:es && npm run build:unpkg",
"build:cjs": "babel src --out-dir lib --ignore **/*.test.js",
"clear": "rimraf es/* && rimraf dist/*",
"build": "npm run clear && npm run build:es && npm run build:unpkg",
"build:es": "cross-env BABEL_ENV=es babel src --out-dir es --ignore **/*.test.js",
"build:unpkg": "cross-env BABEL_ENV=es rollup --config",
"codecov": "codecov",
"doctoc": "doctoc readme.md --title \"## Table of Contents\"",
"lint": "eslint .*rc.js *.js src/**/*.js --ignore-pattern '!.*rc.js'",
"lint": "eslint src/**/*.js",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't quite figure out how to include linting the CommonJS root files without ESLint throwing an error, hope this is okay.

"lint:fix": "npm run lint -- --fix",
"prerelease": "npm run build",
"preversion": "npm run doctoc && npm test",
Expand Down