Socket
Socket
Sign inDemoInstall

brickyard3

Package Overview
Dependencies
147
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    brickyard3

plugin framework for building extendable and flexible web apps or back-end services.


Version published
Weekly downloads
8
increased by300%
Maintainers
1
Install size
7.41 MB
Created
Weekly downloads
 

Changelog

Source

2.2.2 (2017-03-14)

<a name="2.2.1"></a>

Readme

Source

brickyard3

Dependency Status DevDependency Status

npm version License

brickyard3 是一个基于插件式架构的前端代码管理与构建框架工具,是面向产品线开发的代码共享与分化的集成解决方案。

简介

此核心库只完成几项核心功能:

  • 作为命令行工具,调用用户指定且已安装的子命令。如brickyard install ****
  • 作为配置收集工具,生成一个运行时配置对象,提供给子命令使用。
  • 提供一个函数工具集。

使用

  1. 用户仓库需要安装此核心库以及需要用到的子命令[可选](dev,release...)
npm install brickyard3 brickyard-command-dev brickyard-command-release brickyard-command-install -S
  1. 用户仓库的代码目录结构需要如下安排(类似)
├─ bricks (name configurable)
│   ├── brickyard-plugins
│   └── awosome-app
├── recipes (name configurable)
│   └── awosome-app (program-specific config)
├── by-conf.js (optional)
└── package.json
  1. 项目开发需按如下步骤:
# 安装插件依赖
brickyard install awesome-app

# 启动开发流程
brickyard dev awesome-app
# 启动发布流程, 不需要预先 install
brickyard release awesome-app
  1. 项目生成文件目录结构
├── dist
│   ├── build-awesome-app
│   │   └── bower_components
│   └── release-wcg
│       ├── bower_components
│       └── www

www目录里面就是可打包的发布目录

Note: 由于开发模式下使用的是内存文件系统,并不会生成目标文件,所以build-***目录下只有安装的bower packages

配置

配置可进行多级覆盖,具体优先级如下(从上到下递增):

framework default config
user config (optional)
program config (optional)
command line config (optional)

user config 默认是运行目录下 by-conf.js,除非用户指定了 config 参数

user config 文件的输出配置中可以定义 commands 属性,用于指定需要加载的命令

	module.exports = {
		commands: [
			'brickyard-command-dev',
			{
				name: 'brickyard-command-test',
				path: '/home/hal/app/lib/test.js' // absolute path
			}
		]
	...
	}

项目插件

/bricks(或者其他指定文件夹内)放置插件,/recipes(或者其他指定文件夹内)放置目标程序的组装计划。

程序由插件组装而成。

插件可以直接是一个npm package,或者以bower管理依赖的package

组装计划需要是以下格式:

module.exports = {
	id: 'awesome-app',
	plugins: [
		'brickyard-plugins',
		'awosome-app'
	],
	config: {
		...(the same as config)
	}
}

如果指定了id,会取代其目录名成为组装计划的名称。

详细设计

参见 设计文档

FAQs

Last updated on 14 Mar 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc