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

@cnbritain/merlin-www-build-tools

v2.1.7

Published

Build tools for the www app

Downloads

48

Readme

merlin-www-build-tools

Build tools for the www app


Install

npm i -S @cnbritain/merlin-www-build-tools

Gulp tasks

copy

Copies over the files to a static location.

jshint

Runs jshint over all of the specified js files.

sass

Compiles out the sass to css using our custom component importer.

js

Chunks and tree shakes our js using webpack.

serve

Runs browsersync and watches specified js, sass and html files.

dev

Runs copy, sass, jshint, js and serve.

staging

Runs copy, sass, jshint and js.

production

Runs copy, sass, jshint and js.


Config

{
        copy: {
            src: [
                /* List of source files to copy */
            ],
            dest: /* Location to copy all the source files to */
        },
        js: {
            src: {
                /* Key: nice name for script */
                /* Value: location of script file */
                'core': getAbsDir('frontend/js/pages/core.js'),
            },
            dest: /* Location to save all the static js files to */
        },
        jshint: {
            src: [
                /* List of all js files to jshint */
            ]
        },
        release: {
            changelog: /* Location of changelog file */,
            package: /* Location of package json file */
        },
        sass: {
            src: [
                /* List of all sass files that need compiling */
            ],
            dest: /* Location to save all compiled css files */
        },
        watch: {
            proxy: /* Proxy url */,
            html: [
                /* List of html files to watch */
            ],
            js: [
                /* List of js files to watch */
            ],
            sass: [
                /* List of sass files to watch */
            ]
        }
    }

Default config

{
        copy: {
            src: [
                getAbsDir(`node_modules/@cnbritain/merlin-www-assets/static/${abbr}/**/*`)
            ],
            dest: getAbsDir(`${abbr}_backend/static/`)
        },
        js: {
            src: {
                'core': getAbsDir('frontend/js/pages/core.js'),
                'homepage': getAbsDir('frontend/js/pages/homepage.js'),
                'tagpage': getAbsDir('frontend/js/pages/tagpage.js'),
                'article': getAbsDir('frontend/js/pages/article.js'),
                'search': getAbsDir('frontend/js/pages/search.js'),
                'magazine': getAbsDir('frontend/js/pages/magazine.js'),
                'shows': getAbsDir('frontend/js/pages/shows.js'),
                'subscribe': getAbsDir('frontend/js/pages/subscribe.js'),
                'video': getAbsDir('frontend/js/pages/video.js')
            },
            dest: getAbsDir(`${abbr}_backend/static/js/`)
        },
        jshint: {
            src: [
                getAbsDir('frontend/js/**/*.js')
            ]
        },
        release: {
            changelog: getAbsDir('./CHANGELOG.md'),
            package: getAbsDir('./package.json')
        },
        sass: {
            src: [
                getAbsDir('frontend/sass/page.scss')
            ],
            dest: getAbsDir(`${abbr}_backend/static/css/`)
        },
        watch: {
            proxy: 'localhost:9001',
            html: [
                getAbsDir(`${abbr}_backend/templates/**/*.html`),
                getAbsDir(`${abbr}_backend/templates/**/*.mustache`),
                getAbsDir('node_modules/@cnbritain/**/templates/**/*.html'),
                getAbsDir('node_modules/@cnbritain/**/templates/**/*.mustache'),
                getAbsDir('node_modules/@cnbritain/**/partials/**/*.html'),
                getAbsDir('node_modules/@cnbritain/**/partials/**/*.mustache')
            ],
            js: [
                getAbsDir('frontend/js/*.js'),
                getAbsDir('node_modules/@cnbritain/**/js/*.js')
            ],
            sass: [
                getAbsDir('frontend/sass/**/*.scss'),
                getAbsDir('node_modules/@cnbritain/**/sass/**/*.scss')
            ]
        }
    }