-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: circular dependency, introduce rollup, cleanup GH actions
- Loading branch information
1 parent
d3e2efc
commit 464c353
Showing
11 changed files
with
249 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ node_modules/ | |
.byebug_history | ||
*.log | ||
/.dir-locals.el | ||
/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,18 +23,27 @@ | |
}, | ||
"license": "MIT", | ||
"author": "Nathan Hopkins <[email protected]>", | ||
"main": "./javascript/index.js", | ||
"module": "./javascript/index.js", | ||
"main": "./dist/cable_ready.umd.js", | ||
"module": "./dist/cable_ready.module.js", | ||
"files": [ | ||
"dist/*", | ||
"src/*" | ||
], | ||
"scripts": { | ||
"lint": "yarn run prettier-standard:check", | ||
"format": "yarn run prettier-standard:format", | ||
"prettier-standard:check": "yarn run prettier-standard --check ./javascript/**/*.js", | ||
"prettier-standard:format": "yarn run prettier-standard ./javascript/**/*.js" | ||
"prettier-standard:format": "yarn run prettier-standard ./javascript/**/*.js", | ||
"build": "yarn rollup -c", | ||
"watch": "yarn rollup -wc" | ||
}, | ||
"dependencies": { | ||
"morphdom": "^2.6.1" | ||
}, | ||
"devDependencies": { | ||
"prettier-standard": "^16.4.1" | ||
"@rollup/plugin-commonjs": "^21.0.1", | ||
"@rollup/plugin-node-resolve": "^13.0.6", | ||
"prettier-standard": "^16.4.1", | ||
"rollup": "^2.60.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import resolve from "@rollup/plugin-node-resolve" | ||
import commonjs from '@rollup/plugin-commonjs'; | ||
|
||
const basePlugins = [ | ||
resolve(), | ||
commonjs() | ||
] | ||
|
||
export default [ | ||
{ | ||
external: ["morphdom"], | ||
input: "javascript/index.js", | ||
output: [ | ||
{ | ||
name: "CableReady", | ||
file: "dist/cable_ready.umd.js", | ||
format: "umd", | ||
sourcemap: true, | ||
exports: "named", | ||
globals: {morphdom: "morphdom"}, // UMD build wants a global...annoying. | ||
}, | ||
{ | ||
file: "dist/cable_ready.module.js", | ||
format: "es", | ||
sourcemap: true, | ||
} | ||
], | ||
plugins: basePlugins, | ||
watch: { | ||
include: "javascript/**" | ||
} | ||
}, | ||
] |
Oops, something went wrong.