Skip to content

Commit

Permalink
feat(defaulttheme): add defaultTheme export for purge
Browse files Browse the repository at this point in the history
It uses JSON stringify to create a string for purge to work correctly. This doesn't look good and
may change in the future.
  • Loading branch information
estevanmaito committed Jul 13, 2020
1 parent 9258df1 commit 22ac723
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
dist
dev
coverage
coverage
lib
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ node_modules
coverage
dist
dev
style/output.css
style/output.css
lib
4 changes: 2 additions & 2 deletions defaultTheme.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const defaultTheme = require('./src/themes/default').default
const defaultTheme = require('./lib/default')

module.exports = defaultTheme
module.exports = JSON.stringify(defaultTheme)
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"main": "dist/index.js",
"files": [
"dist",
"themes.js",
"lib",
"defaultTheme.js",
"plugin.js",
"README.md"
],
Expand All @@ -21,7 +22,8 @@
"test:coverage": "jest --coverage",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"prebuild": "rimraf dist",
"build:lib": "babel src/themes --out-dir lib",
"prebuild": "rimraf dist && build:lib",
"build": "webpack",
"prerelease": "npm run build",
"release": "release-it",
Expand Down

0 comments on commit 22ac723

Please sign in to comment.