csstools / postcss-partial-import

Inline sugary @import statements in CSS
Creative Commons Zero v1.0 Universal
72 stars 17 forks source link

Node#before is deprecated. Use Node#raws.before #41

Open h0tc0d3 opened 7 years ago

h0tc0d3 commented 7 years ago
npm install postcss-partial-import@4.1.0
Node#before is deprecated. Use Node#raws.before
(node:3276) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot set property 'parent' of undefined
(node:3276) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:3276) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot set property 'parent' of undefined
(node:3276) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): TypeError: Cannot set property 'parent' of undefined
(node:3276) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): TypeError: Cannot set property 'parent' of undefined
(node:3276) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 5): TypeError: Cannot set property 'parent' of undefined
(node:3276) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 6): TypeError: Cannot set property 'parent' of undefined
(node:3276) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 7): TypeError: Cannot set property 'parent' of undefined
(node:3276) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 8): TypeError: Cannot set property 'parent' of undefined
var gulp = require("gulp"),
        sourcemaps = require("gulp-sourcemaps"),
        postcssgulp = require("gulp-postcss"),
        precss = require("precss");

gulp.task("css", function () {
        var processors = [precss({
                "lookup": false,
                "mixins": false,
                "variables": false,
                "media": false,
                "properties": false,
                "minmax": false,
                "color": false,
                "nesting": false,
                "nested": false,
                "selectors": false,
                "atroot": false,
                "matches": false,
                "not": false,
        "extend": false
        })];
        return gulp.src("./src/style.css")
            .pipe(sourcemaps.init())
            .pipe(postcssgulp(processors))
            .pipe(sourcemaps.write("."))
            .pipe(gulp.dest("./css"));
});

gulp.task("default", ["css"]);
h0tc0d3 commented 7 years ago
@import "variables.css";
@import "fonts.css";
@import "base.css";

@copy full {
@import "typography.css";
}

@paste full;

@media screen and (max-width: 799px) {
    @ihamster {
        --font-size: 14px;
        --line-height: 1.25;
        --to-font-size: 18px;
        --to-line-height: 1.4;
        --viewport: 320px 800px;
        --unit: vw;
    }
    @ruler;
    @paste full;
    @hamster end;
}

@media screen and (min-width: 800px) and (max-width: 1919px){
    @ihamster {
        --font-size: 18px;
        --line-height: 1.4;
        --to-font-size: 21px;
        --to-line-height: 1.5;
        --viewport: 800px 1920px;
        --unit: vw;
    }
    @ruler;
    @paste full;
    @hamster end;
}
@media screen and (min-width: 1920px){
    @ihamster {
        --font-size: 21px;
        --line-height: 1.5;
        --to-font-size: 42px;
        --to-line-height: 1.6;
        --viewport: 1920px 3840px;
        --unit: vw;
    }
    @ruler;
    @paste full;
    @hamster end;
}

@import "icons.css";
@import "helpers.css";
@jonathantneal t1@1.0.0 C:\Code\node\t1
+-- postcss-partial-import@4.1.0
| `-- glob@7.1.1
|   `-- minimatch@3.0.4
`-- precss@1.4.0
  `-- postcss-partial-import@1.3.0

npm WARN t1@1.0.0 No description
npm WARN t1@1.0.0 No repository field.

C:\Code\node\t1>gulp
[17:25:16] Using gulpfile C:\Code\node\t1\gulpfile.js
[17:25:16] Starting 'css'...
Node#before is deprecated. Use Node#raws.before
(node:5084) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot set property 'parent' of undefined
(node:5084) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:5084) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot set property 'parent' of undefined
(node:5084) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): TypeError: Cannot set property 'parent' of undefined
(node:5084) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): TypeError: Cannot set property 'parent' of undefined
(node:5084) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 5): TypeError: Cannot set property 'parent' of undefined
(node:5084) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 6): TypeError: Cannot set property 'parent' of undefined
(node:5084) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 7): TypeError: Cannot set property 'parent' of undefined
(node:5084) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 8): TypeError: Cannot set property 'parent' of undefined
hustcer commented 7 years ago

+1

cyqresig commented 7 years ago

+1