Skip to content

Commit 07136f1

Browse files
committed
build(): add gulpfile to inline resources.
1 parent df1cb66 commit 07136f1

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed

gulpfile.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
var gulp = require('gulp');
2+
var inlineNg2Template = require('gulp-inline-ng2-template');
3+
4+
5+
/**
6+
* DO NOT ADD EXTRA TASKS HERE.
7+
*
8+
* gulp is only used temporarily in order to perform HTML and CSS in-lining for publishing.
9+
* Eventually the CLI should support this.
10+
*
11+
* See https://github.com/angular/angular-cli/issues/296
12+
*
13+
*/
14+
15+
gulp.task('inline-resources', function(){
16+
gulp.src('./dist/components/**/*.js')
17+
.pipe(inlineNg2Template({base: './dist'}))
18+
.pipe(gulp.dest('./dist/components'));
19+
});

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
"ember-cli-inject-live-reload": "^1.3.0",
4545
"fs-extra": "^0.26.5",
4646
"glob": "^6.0.4",
47+
"gulp": "^3.9.1",
48+
"gulp-inline-ng2-template": "^1.1.2",
4749
"jasmine-core": "^2.3.4",
4850
"js-yaml": "^3.5.2",
4951
"karma": "^0.13.15",

src/components/sidenav/sidenav.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ $md-sidenav-push-background-color: md-color($md-background, dialog) !default;
1212

1313

1414
/**
15-
* Mixin to help with defining LTR/RTL `transform: translateX()` values.
15+
* Mixin to help with defining LTR/RTL 'transform: translateX()' values.
1616
* @param $open The translation value when the sidenav is opened.
1717
* @param $close The translation value when the sidenav is closed.
1818
*/
1919
@mixin md-sidenav-transition($open, $close) {
2020
transform: translateX($close);
2121

2222
&.md-sidenav-closed {
23-
// We use `visibility: hidden | visible` because `display: none` will not animate any
23+
// We use 'visibility: hidden | visible' because 'display: none' will not animate any
2424
// transitions, while visibility will interpolate transitions properly.
2525
// see https://developer.mozilla.org/en-US/docs/Web/CSS/visibility, the Interpolation
2626
// section.
@@ -46,7 +46,7 @@ $md-sidenav-push-background-color: md-color($md-background, dialog) !default;
4646
:host {
4747
// We need a stacking context here so that the backdrop and drawers are clipped to the
4848
// MdSidenavLayout. This creates a new z-index stack so we use low numbered z-indices.
49-
// We create another stacking context in the `<md-content>` and in each sidenav so that
49+
// We create another stacking context in the '<md-content>' and in each sidenav so that
5050
// the application content does not get messed up with our own CSS.
5151
@include md-stacking-context();
5252

@@ -71,7 +71,7 @@ $md-sidenav-push-background-color: md-color($md-background, dialog) !default;
7171
// numbers.
7272
z-index: 2;
7373

74-
// We use `visibility: hidden | visible` because `display: none` will not animate any
74+
// We use 'visibility: hidden | visible' because 'display: none' will not animate any
7575
// transitions, while visibility will interpolate transitions properly.
7676
// see https://developer.mozilla.org/en-US/docs/Web/CSS/visibility, the Interpolation
7777
// section.

0 commit comments

Comments
 (0)