Socket
Socket
Sign inDemoInstall

require-to-webpack-cli

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

require-to-webpack-cli

A simple CLI for scaffolding requirejs projects.


Version published
Maintainers
1
Created
Source

require-cli

A simple CLI for scaffolding require projects

Installing

Using npm:

$ npm install -g require-to-webpack-cli

Quick Start

Create the app:

$ require init

Install dependencies:

$ npm install

Rock and Roll

$ npm run build

注:安装时将项目名改为对应页面项目名

迁移步骤

  1. 将 requirejs 的页面入口文件代码(路径目录:_pkg/job/)复制到/src/index.js 中;
  2. 将引用模块文件拷贝到 job 或 common 中(对应原引用路径)
  3. 将 index.js 的入口引用路径改为相对路径(./job)
  4. 页面 css 拷贝到 src/css 文件夹下,打包时会自动 copy 到 dist/css 目录下

代码执行中容易出现的问题:

  1. xxx is not defined:由于变量声明没有加 var 导致

Keywords

FAQs

Package last updated on 30 Sep 2019

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