How to use postcss-import - 9 common examples

To help you get started, we’ve selected a few postcss-import examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wprig / wprig / gulp / editorStyles.js View on Github external
// Skip minifying files if we aren't building for
	// production and debug is enabled
	if( config.dev.debug.styles && ! isProd ) {
		postcssPlugins.pop();
	}

	// Report messages from other postcss plugins
	postcssPlugins.push(
		reporter({ clearReportedMessages: true })
	);

	// Return a single stream containing all the
	// after replacement functionality
	return pipeline.obj([
		gulpPlugins.postcss([
			AtImport({
				path: [paths.styles.srcDir],
				plugins: [
					stylelint(),
				]
			})
		]),
		gulpPlugins.postcss(postcssPlugins),
		gulpPlugins.if(
            config.dev.debug.styles,
            gulpPlugins.tabify(2, true)
        ),
		gulpPlugins.rename({
			suffix: '.min'
		}),
		server.stream({match: "**/*.css"}),
	]);
github wprig / wprig / gulp / styles.js View on Github external
// Skip minifying files if we aren't building for
	// production and debug is enabled
	if( config.dev.debug.styles && ! isProd ) {
		postcssPlugins.pop();
	}

	// Report messages from other postcss plugins
	postcssPlugins.push(
		reporter({ clearReportedMessages: true })
	);

	// Return a single stream containing all the
	// after replacement functionality
	return pipeline.obj([
		gulpPlugins.postcss([
			AtImport({
				path: [paths.styles.srcDir],
				plugins: [
					stylelint(),
				]
			})
		]),
		gulpPlugins.postcss(postcssPlugins),
		gulpPlugins.if(
            config.dev.debug.styles,
            gulpPlugins.tabify(2, true)
        ),
		gulpPlugins.rename({
			suffix: '.min'
		}),
		server.stream({match: "**/*.css"}),
	]);
github cef62 / css-modules-compiler / test / extractor / extractor.spec.js View on Github external
describe('extract', () => {
  test('basic')
  test('blacklist', ['*.global.css'])
  test('composes')
  test('optimize')
  test('plugins', [], atImport())
})
github HandshakeAlliance / testnet-faucet / gulpfile.babel.js View on Github external
function css() {
  var plugins = [
    postcssImport(),
    precss(),
    autoprefixer({
      path: ["src/public/css"]
    }),
    cssnano()
  ];

  return gulp
    .src(paths.styles.src)
    .pipe(sourcemaps.init())
    .pipe(postcss(plugins))
    .pipe(sourcemaps.write())
    .pipe(gulp.dest(paths.styles.dest));
}
github HandshakeAlliance / HNScan / gulpfile.babel.js View on Github external
function css() {
  var plugins = [
    postcssImport(),
    precss(),
    autoprefixer({
      path: ["src/public/css"]
    }),
    cssnano()
  ];

  return gulp
    .src(paths.styles.src)
    .pipe(sourcemaps.init())
    .pipe(postcss(plugins))
    .pipe(sourcemaps.write())
    .pipe(gulp.dest(paths.styles.dest));
}
github HandshakeAlliance / handshakealliance.org / gulpfile.babel.js View on Github external
function css() {
  var plugins = [
    postcssImport(),
    precss(),
    autoprefixer({
      path: ["src/css"]
    }),
    cssnano()
  ];

  return gulp
    .src(paths.styles.src)
    .pipe(sourcemaps.init())
    .pipe(postcss(plugins))
    .pipe(sourcemaps.write())
    .pipe(gulp.dest(paths.styles.dest));
}
github radiant-player / radiant-player-electron / support / config / app.js View on Github external
postcss: function plugins(bundler) {
    return [
      postcss({ addDependencyTo: bundler }),
      precss(),
    ];
  },
};
github shannonmoeller / todomvc-custom-elements / tasks / styles.js View on Github external
export async function styles() {
	return gulp
		.src('./src/clien*/styles/*.css', {
			sourcemaps: true,
		})
		.pipe(postcss([
			cssImport(),
			cssNext(),
			cssNano({
				autoprefixer: false,
			}),
		]))
		.pipe(gulp.dest('dist', {
			sourcemaps: '.',
		}));
}
github sebastian-software / rollup-plugin-rebase / src / index.js View on Github external
function getPostCssPlugins(keepName) {
  return [
    postcssImport(),
    postcssSmartAsset({
      url: "copy",
      useHash: true,
      keepName
    })
  ]
}

postcss-import

PostCSS plugin to import CSS files

MIT
Latest version published 8 months ago

Package Health Score

79 / 100
Full package analysis

Popular postcss-import functions