-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(workspace): 🏗 refactoring lerna to internal dependents (#554)
- Loading branch information
Showing
104 changed files
with
556 additions
and
351 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
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
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,3 @@ | ||
export const preSchemeLoadingCssText = `vwc-audio, vwc-badge, vwc-button, vwc-calendar, vwc-carousel-item, vwc-carousel, vwc-checkbox, vwc-chip-set, vwc-chip, vwc-circular-progress, vwc-drawer, vwc-fab, vwc-file-picker, vwc-formfield, vwc-helper-message, vwc-icon-button-toggle, vwc-icon-button, vwc-icon, vwc-inline, vwc-keypad, vwc-linear-progress, vwc-check-list-item, vwc-list-expansion-panel, vwc-list-item, vwc-list, vwc-radio-list-item, vwc-media-controller, vwc-menu, mwc-chip-set, mwc-chip, vwc-notched-outline, vwc-note, vwc-radio, vwc-relative-time, vwc-scheme-select, vwc-select, vwc-slider, vwc-switch, vwc-tab-bar, vwc-tab, vwc-textarea, vwc-textfield, vwc-theme-switch, vwc-top-app-bar-fixed, vwc-top-app-bar { | ||
visibility: hidden; | ||
}` |
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
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 @@ | ||
skip-missing: 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
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,38 @@ | ||
{ | ||
"name": "@vonage/vvd-umbrella", | ||
"version": "1.0.4", | ||
"description": "Supplies various tools for authoring, testing and building Vivid components", | ||
"keywords": [ | ||
"build", | ||
"test", | ||
"compile", | ||
"author", | ||
"toolkit" | ||
], | ||
"private": true, | ||
"bin": { | ||
"umbrella-style-modules": "./tools/style-modules/index.js" | ||
}, | ||
"author": "Tal Weinfeld <tal.weinfeld@vonage.com>", | ||
"homepage": "https://github.com/Vonage/vivid#readme", | ||
"license": "ISC", | ||
"publishConfig": { | ||
"registry": "https://vonagecc.jfrog.io/vonagecc/api/npm/npm/" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/Vonage/vivid.git" | ||
}, | ||
"scripts": { | ||
"test": "echo \"Error: run tests from root\" && exit 1" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/Vonage/vivid/issues" | ||
}, | ||
"dependencies": { | ||
"glob": "^7.1.6", | ||
"minimist": "^1.2.5", | ||
"sass": "^1.32.4", | ||
"kefir": "^3.8.8" | ||
} | ||
} |
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,73 @@ | ||
#!/usr/bin/env node | ||
const | ||
fp = require('lodash/fp'), | ||
glob = require('glob'), | ||
kefir = require('kefir'), | ||
parseArgs = require('minimist'), | ||
{ writeFile } = require('fs'), | ||
{ join: joinPath, extname: getExtension, basename: getBase, dirname: getDir } = require('path'), | ||
{ render: renderSass } = require('sass'); | ||
|
||
const { path:basePath = "." } = parseArgs(process.argv.slice(2)); | ||
|
||
console.time('Total'); | ||
|
||
const | ||
fileStreamFromGlob = (path)=> kefir.fromNodeCallback(fp.partial(glob, [path])).flatten(), | ||
tsTemplate = (css)=> [ | ||
"// autogenerated module", | ||
"import {css} from 'lit-element';", | ||
["export const style = css`", css, "`;"].join('') | ||
].join('\n'), | ||
prefixWith = (path)=> (pre)=> joinPath(...[getDir(path), [pre, getBase(path)].join('')]), | ||
suffixWith = (path)=> (suf)=> joinPath(...[getDir(path), [getBase(path), suf].filter(Boolean).join('.')]); | ||
|
||
fileStreamFromGlob(joinPath(process.cwd(), basePath, './src/*.s[ac]ss')) | ||
.flatMapConcat((sassFile)=> { | ||
return kefir.fromNodeCallback((cb)=> | ||
renderSass({ | ||
importer: (path, prev, done)=> { | ||
kefir | ||
.concat( | ||
[ | ||
[path, "_index.scss"].join('/'), | ||
...["", "_"] | ||
.map(prefixWith(path)) | ||
.flatMap((basePath)=> ["", "scss", "sass"].map(suffixWith(basePath))) | ||
].map((probePath)=> kefir.fromNodeCallback((cb) => { | ||
const res = fp.attempt(() => require.resolve(probePath)); | ||
cb(fp.isError(res) && res, res); | ||
})) | ||
) | ||
.ignoreErrors() | ||
.map((outPath)=> ({ file: outPath })) | ||
.beforeEnd(fp.noop) | ||
.take(1) | ||
.onValue(done); | ||
}, | ||
file: sassFile, | ||
outputStyle: "compressed" | ||
}, cb) | ||
) | ||
.map(({ css })=> ({ | ||
sass_path: sassFile, | ||
css_content: css.toString() | ||
})); | ||
}) | ||
.map(({ css_content, sass_path })=> ({ | ||
module_path: joinPath(...[getDir(sass_path), [getBase(sass_path, getExtension(sass_path)), 'css.ts'].join('.')]), | ||
module_content: tsTemplate(css_content), | ||
}) | ||
) | ||
.flatMap(({ module_path, module_content })=> | ||
kefir | ||
.fromNodeCallback((cb)=>writeFile(module_path, module_content, cb)) | ||
.map(()=> ` ✔ ${module_path}`) | ||
) | ||
.takeErrors(1) | ||
.onValue(console.log) | ||
.onEnd(()=> console.timeEnd('Total')) | ||
.onError((err)=>{ | ||
console.warn(err); | ||
process.exit(1); | ||
}); |
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
Oops, something went wrong.