-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit updates scripts and configs to support SSR style projects. Changes to be committed: renamed: commitlint.config.js -> commitlint.config.cjs modified: package-lock.json modified: package.json modified: packageScripts/postinstall.mjs renamed: scripts/generateDocs.js -> scripts/generateDocs.mjs deleted: scripts/postCss.js new file: scripts/postCss.mjs renamed: scripts/prepExampleFiles.js -> scripts/prepExampleFiles.mjs
- Loading branch information
1 parent
9b33dee
commit 64e4aa7
Showing
8 changed files
with
256 additions
and
100 deletions.
There are no files selected for viewing
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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,18 @@ | ||
import autoprefixer from 'autoprefixer'; | ||
import postcss from 'postcss'; | ||
import comments from 'postcss-discard-comments'; | ||
import fs from 'fs'; | ||
|
||
fs.readFile('src/style.css', (err, css) => { | ||
postcss([autoprefixer, comments]) | ||
.use(comments({ | ||
remove: function(comment) { return comment[0] == "@"; } | ||
})) | ||
.process(css, { from: 'src/style.css', to: 'src/style.css' }) | ||
.then(result => { | ||
fs.writeFile('src/style.css', result.css, () => true) | ||
if ( result.map ) { | ||
fs.writeFile('src/style.map', result.map, () => true) | ||
} | ||
}) | ||
}); |
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