Skip to content

Commit 33f5eb1

Browse files
author
Jed Mao
committed
v1.1.1: Fix issue #7, retire Babel, update deps
1 parent fc17857 commit 33f5eb1

40 files changed

+2271
-918
lines changed

.babelrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.d.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 136 deletions
This file was deleted.

.tasks/gulp-clean.js renamed to .tasks/gulp-clean.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import gulp from 'gulp';
2-
import rimraf from 'gulp-rimraf';
1+
/// <reference path="../typings/gulp.d.ts" />
2+
import * as gulp from 'gulp';
3+
var rimraf = require('gulp-rimraf');
34

45
export default () => {
56
return gulp.src([

.tasks/gulp-copy.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

.tasks/gulp-copy.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/// <reference path="../typings/gulp.d.ts" />
2+
import * as gulp from 'gulp';
3+
4+
export default () => {
5+
return gulp.src(
6+
[
7+
'build/lib/**/*.js',
8+
'build/lib/**/*.d.ts'
9+
],
10+
{ base: 'build' }
11+
)
12+
.pipe(gulp.dest('dist'));
13+
};

.tasks/gulp-eslint.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

.tasks/gulp-scripts.js

Lines changed: 0 additions & 44 deletions
This file was deleted.

.tasks/gulp-test.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

.tasks/gulp-tslint.js renamed to .tasks/gulp-tslint.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import gulp from 'gulp';
2-
import plumber from 'gulp-plumber';
3-
import tslint from 'gulp-tslint';
1+
/// <reference path="../typings/gulp.d.ts" />
2+
import * as gulp from 'gulp';
3+
var plumber = require('gulp-plumber');
4+
var tslint = require('gulp-tslint');
45

56
export default () => {
67
return gulp.src([

.tasks/gulp-typescript.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

.tasks/gulp-watch.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 1.1.1
2+
- Fix module resolution (fixes [`#5`](https://github.com/jedmao/postcss-nested-props/issues/5)).
3+
14
## 1.1.0
25
- [Supports vendor pseudo elements](https://github.com/jedmao/postcss-nested-props/pull/4). Thanks [@ooHmartY](https://github.com/ooHmartY)!
36

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ postcss([ require('postcss-nested-props') ]);
7676

7777
```ts
7878
///<reference path="node_modules/postcss-nested-props/.d.ts" />
79-
import postcssNestedProps from 'postcss-nested-props';
79+
import * as postcssNestedProps from 'postcss-nested-props';
8080

8181
postcss([ postcssNestedProps ]);
8282
```

gulpfile.babel.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

gulpfile.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/// <reference path="typings/gulp.d.ts" />
2+
import * as gulp from 'gulp';
3+
4+
function loadTask(taskName: string) {
5+
return require(`./.tasks/gulp-${taskName}`).default;
6+
}
7+
8+
gulp.task('default', ['tslint']);
9+
gulp.task('clean', loadTask('clean'));
10+
gulp.task('tslint', loadTask('tslint'));
11+
gulp.task('copy', loadTask('copy'));

lib/plugin.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
///<reference path="../typings/node/node.d.ts" />
2-
///<reference path="../node_modules/postcss/postcss.d.ts" />
3-
import postcss from 'postcss';
1+
import * as postcss from 'postcss';
42
const pseudoClasses = require('pseudo-classes');
53
const pseudoElements = require('pseudo-elements');
64

7-
// ReSharper disable once UnusedLocals
8-
// ReSharper disable once InconsistentNaming
9-
export default postcss.plugin('postcss-nested-props', () => {
5+
const PostCssNestedProps = postcss.plugin('postcss-nested-props', () => {
106
return root => {
117
root.walkRules(rule => {
128
unwrapRule([], rule);
@@ -53,3 +49,5 @@ function unwrapRule(namespace: string[], rule: postcss.Rule) {
5349
rule.remove();
5450
namespace.pop();
5551
}
52+
53+
export = PostCssNestedProps;

0 commit comments

Comments
 (0)