Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
hansl committed Sep 21, 2016
1 parent 9955c95 commit 59f2229
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions tools/gulp/tasks/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,6 @@ const rollup = require('rollup').rollup;
const componentsDir = path.join(SOURCE_ROOT, 'lib');


function camelCase(str: string) {
return str.replace(/-(\w)/g, (_: any, letter: string) => {
return letter.toUpperCase();
})
}


class ResourceInliner {
constructor() {}
get name() { return 'resource-inliner'; }

transform(source: string, id: any) {
const code = inlineResources.inlineResourcesFromString(source, (url: string) => {
let dir = path.dirname(id);
if (url.endsWith('.html')) {
dir = dir.replace(/^.*\/@angular\/material/, path.join(__dirname, '../../../src/lib'));
}
return path.join(dir, url);
});
const map = JSON.parse(readFileSync(`${id}.map`, 'utf8'));

return {code, map};
}
}


task(':watch:components', () => {
watch(path.join(componentsDir, '**/*.ts'), [':build:components:ts']);
watch(path.join(componentsDir, '**/*.scss'), [':build:components:scss']);
Expand Down

0 comments on commit 59f2229

Please sign in to comment.