Socket
Socket
Sign inDemoInstall

basework-core

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

basework-core

A flexible base framework for web projects


Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Basework 🏗

An experimental base framework for web projects. See why Basework to be sold on the idea.

🚨 Disclaimer - This project is in its early days. Do not use Basework in production.

Usage

  • Install the Basework CLI with npm install -g basework-cli
  • Create a new project with basework new
  • Enter the project root with cd basework-example
  • Install the project packages with npm i
  • Run the project locally with basework start to start development
  • Open localhost:8000

Additionally, build the project locally with basework build and check the resulting dist folder to see what the project output looks like.

By building off the example project, you get these performance benefits out of the box.

Basework files

There are two files you can add to the root of your project to change the default behavior of Basework:

  • basework-config.js, which allows you to change bundlers and customize the build process:

    const baseworkConfig = () => ({
    bundler: 'webpack',
    build: [
      'prepare',
      'prefetch',
      'transform',
      'bundle',
      'create',
      'prerender'
    ]
    });
    
    module.exports = baseworkConfig;
    
  • basework-api.js, which allows you to define custom build steps to run in the build process.

Find more information on what each build step does in the build step notes.

Custom bundler configuration

Basework tries to choose sensible defaults for bundlers. If you need more flexibility, you can add the following files to your project root to add custom configuration to your bundler:

  • webpack-config.js - base config used by environment specific configs (dev, prod, etc.)
  • webpack-config-dev.js - config used in development (when running basework start)
  • webpack-config-prod.js - config used in production (when running basework build)

These files must export an object or funtion like a normal webpack config.

Get invovled

This project is mostly a sandbox for new ideas and concepts. If you'd like to collaborate, feel free to open an issue in this repo!

Todos

Longer term goals

  • Merge all Basework repos into a single monorepo
  • Support parcel and rollup
  • Create a single generalized dev server that works with any bundler
  • Reduce dependency vulnerabilities to zero
  • Add unit and integration tests
  • Add proper CI/CD
  • Create a project generator for React and Vue
  • Introduce an optional basework-router implementation for web components, React and Vue
  • Build a dedicated documentation website

Notes

This project is heavily inspired by Gatsby.

Keywords

FAQs

Package last updated on 12 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc