npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

laravel-mix-storepress

v0.0.4

Published

To make WP Projects easily with laravel mix for StorePress

Downloads

3

Readme

Laravel Mix Extension for StorePress

webpack.mix.js Example

const mix = require('laravel-mix');
const min = mix.inProduction() ? '.min' : '';

require('laravel-mix-storepress');

mix.js(`src/js/scripts.js`, `assets/js/scripts${min}.js`);

// OS Notification
mix.notification('Notification Title', 'NOTIFICATION_ICON_PATH');  // Example: global.Mix.paths.root('images/icon.png')

// File Banner
mix.banner('Banner Text for every js and css file');

// WP Translation
mix.translation('Package Title', 'text-domain');

// Some WP Tasks
mix.wp();

// Create Package
mix.package('File/Directory List with new line'); // Will run on: npm run package

package.json Script

  "devDependencies" : {
    "laravel-mix" : "^6.0.49",
    "laravel-mix-storepress": "^0.0.4"
  },
  "scripts" : {
    "development" : "mix",
    "production" : "mix --production",
    "dev" : "mix watch",
    "build" : "npm run development && npm run production",
    "package" : "npm run build && cross-env PACKAGE=yes node_modules/.bin/webpack --progress --config=node_modules/laravel-mix/setup/webpack.config.js"
  },
   "engines" : {
    "node" : "^16.16.0",
    "npm" : "^8.11.0"
  }

Full API

// Full API
// https://laravel-mix.com/docs/6.0/api

// mix.alias({
//     '@': path.join(__dirname, 'resources/js')
// });

// mix.js(src, output);

// mix.react(src, output); <-- Identical to mix.js(), but registers React Babel compilation.

// mix.preact(src, output); <-- Identical to mix.js(), but registers Preact compilation.

// mix.coffee(src, output); <-- Identical to mix.js(), but registers CoffeeScript compilation.

// mix.ts(src, output); <-- TypeScript support. Requires tsconfig.json to exist in the same folder as webpack.mix.js

// mix.extract(vendorLibs);
// mix.sass(src, output);
// mix.less(src, output);
// mix.stylus(src, output);
// mix.postCss(src, output, [require('postcss-some-plugin')()]);
// mix.browserSync('my-site.test');
// mix.combine(files, destination);
// mix.babel(files, destination); <-- Identical to mix.combine(), but also includes Babel compilation.
// mix.copy(from, to);
// mix.copyDirectory(fromDir, toDir);
// mix.minify(file);
// mix.sourceMaps(); // Enable sourcemaps
// mix.version(); // Enable versioning.
// mix.disableNotifications();
// mix.setPublicPath('path/to/public');
// mix.setResourceRoot('prefix/for/resource/locators');
// mix.autoload({
//     jquery: ['$', 'window.jQuery']
// }); <-- Will be passed to Webpack's ProvidePlugin.
// mix.webpackConfig({}); <-- Override webpack.config.js, without editing the file directly.
// mix.babelConfig({}); <-- Merge extra Babel configuration (plugins, etc.) with Mix's default.
// mix.then(function () {}) <-- Will be triggered each time Webpack finishes building.
// mix.dump(); <-- Dump the generated webpack config object to the console.
// mix.extend(name, handler) <-- Extend Mix's API with your own components.
// mix.options({
//   extractVueStyles: false, // Extract .vue component styling to file, rather than inline.
//   globalVueStyles: file, // Variables file to be imported in every component.
//   processCssUrls: true, // Process/optimize relative stylesheet url()'s. Set to false, if you don't want them touched.
//   purifyCss: false, // Remove unused CSS selectors.
//   terser: {}, // Terser-specific options. https://github.com/webpack-contrib/terser-webpack-plugin#options
//   postCss: [] // Post-CSS options: https://github.com/postcss/postcss/blob/master/docs/plugins.md
// });