Skip to content

Commit

Permalink
Issue #SB-13915 task: Dynamic Card component
Browse files Browse the repository at this point in the history
  • Loading branch information
Lakhan Mandloi committed Aug 28, 2019
1 parent 2a15511 commit 7908166
Show file tree
Hide file tree
Showing 285 changed files with 44,880 additions and 393 deletions.
225 changes: 225 additions & 0 deletions sb-ui-components-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion sb-ui-components-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"publish": "cd dist/sb-ui-components && npm publish",
"publish-minor": "cd dist/sb-ui-components && npm publish minor",
"publish-medium": "cd dist/sb-ui-components && npm publish medium",
"publish-major": "cd dist/sb-ui-components && npm publish major"
"publish-major": "cd dist/sb-ui-components && npm publish major",
"postbuild": "ts-node ./projects/sb-ui-components/scripts/css-bundle.ts"
},
"private": true,
"dependencies": {
Expand Down Expand Up @@ -106,6 +107,7 @@
"node-sass": "^4.12.0",
"protractor": "~5.4.0",
"rimraf": "^2.6.3",
"scss-bundle": "^3.0.1",
"ts-node": "~7.0.0",
"tsickle": ">=0.34.0",
"tslib": "^1.9.0",
Expand Down
4 changes: 3 additions & 1 deletion sb-ui-components-app/projects/sb-ui-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@
"peerDependencies": {
"@angular/common": "^7.2.0",
"@angular/core": "^7.2.0"
},
"devDependencies": {
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { relative } from 'path';
import { Bundler } from 'scss-bundle';
import { writeFile } from 'fs-extra';

/** Bundles all SCSS files into a single file */
console.log('Hii');
async function bundleScss() {
const { found, bundledContent, imports } = await new Bundler()
.bundle('../src/lib/styles/sunbird/_styles.scss', ['../src/lib/styles/**/*.scss']);

if (imports) {
const cwd = process.cwd();

const filesNotFound = imports
.filter(x => !x.found)
.map(x => relative(cwd, x.filePath));

if (filesNotFound.length) {
console.error(`SCSS imports failed \n\n${filesNotFound.join('\n - ')}\n`);
throw new Error('One or more SCSS imports failed');
}
}

if (found) {
await writeFile('../dist/lib/styles/sunbird/_styles.scss', bundledContent);
}
}

bundleScss();
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
presets: [
[
'@babel/env',
{
loose: true,
modules: false,
exclude: ['transform-typeof-symbol']
}
]
],
plugins: [
'@babel/plugin-proposal-object-rest-spread'
],
env: {
test: {
plugins: [ 'istanbul' ]
}
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# https://github.com/browserslist/browserslist#readme

>= 1%
last 1 major version
not dead
Chrome >= 45
Firefox >= 38
Edge >= 12
Explorer >= 10
iOS >= 9
Safari >= 9
Android >= 4.4
Opera >= 30
Loading

0 comments on commit 7908166

Please sign in to comment.