This repository has been archived by the owner on Jul 12, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(elements): flatten bundled output (#284)
* feat(elements): flatten bundled output * fix(elements): remove early return from build * fix(elements): update replacement to use regex * fix(elements): update regex to include hyphens and more words * chore(elements): update local gitignore patterns
- Loading branch information
Showing
7 changed files
with
82 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
scss/bundled | ||
# Reference for gitignore patterns: | ||
# https://stackoverflow.com/questions/5533050/gitignore-exclude-folder-but-include-specific-subfolder | ||
!scss/ | ||
|
||
scss/* | ||
!scss/elements.scss | ||
!scss/index.scss |
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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
@import '@carbon/import-once/scss/import-once'; | ||
@import '@carbon/colors/scss/colors'; | ||
@import '@carbon/themes/scss/themes'; | ||
@import '@carbon/layout/scss/layout'; | ||
@import '@carbon/grid/scss/grid'; | ||
@import '@carbon/type/scss/type'; | ||
@import '@carbon/motion/scss/motion'; | ||
// The files below are generated using the `yarn build` stage for this | ||
// package | ||
@import './import-once/import-once'; | ||
@import './colors/colors'; | ||
@import './themes/themes'; | ||
@import './layout/layout'; | ||
@import './grid/grid'; | ||
@import './type/type'; | ||
@import './motion/motion'; |
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,7 @@ | ||
@import '@carbon/import-once/scss/import-once'; | ||
@import '@carbon/colors/scss/colors'; | ||
@import '@carbon/themes/scss/themes'; | ||
@import '@carbon/layout/scss/layout'; | ||
@import '@carbon/grid/scss/grid'; | ||
@import '@carbon/type/scss/type'; | ||
@import '@carbon/motion/scss/motion'; |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* Copyright IBM Corp. 2018, 2018 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const fs = require('fs-extra'); | ||
const path = require('path'); | ||
const packageJson = require('../package.json'); | ||
|
||
const WORKSPACE_NODE_MODULES = path.resolve(__dirname, '../../../node_modules'); | ||
const BUNDLE_DIR = path.resolve(__dirname, '../scss'); | ||
const dependencies = Object.keys(packageJson.dependencies).map(key => { | ||
return [key, path.join(WORKSPACE_NODE_MODULES, key)]; | ||
}); | ||
|
||
async function clean() { | ||
await Promise.all( | ||
dependencies.map(([dependency, dependencyPath]) => { | ||
return fs.remove(path.join(BUNDLE_DIR, path.basename(dependencyPath))); | ||
}) | ||
); | ||
} | ||
|
||
clean().catch(error => { | ||
console.error(error); | ||
}); |