BabelJS Tutorial
babel-core: npm install --save-dev babel-core After installation, here are the details available in package.json: We have installed babel plugins local to the project. This is done so that we can use babel different versions of babeljs. Package.json gives the version details of babeljs used. In order to make use of babel in our project, we need to specify the same in package.json as follows: BabelJS 5. BabelJS — Project setup using Babel 6 BabelJS 21 Following is the package.json that is created: We will install the packages required to start working with babeljs. We will0 码力 | 173 页 | 2.70 MB | 1 年前3跨平台桌⾯应⽤框架:Electron
install install -D electron-builder@21.2.0 -D electron-builder@21.2.0 打包和部署 22 添加build配置 以及给 package.json 加上必要的 build 的配置,主要增加的部分是: {{ "scripts" "scripts":: {{ "pack" "pack":: "electron-builder "pkg" "pkg",, "zip" "zip" ]] }} }},, }} 更新后 package.json 完整配置如下: {{ "name" "name":: "electron-quick-start" "electron-quick-start",, "version" hello.py │ │ ├── main.js │ │ ├── main.js │ │ └── package.json │ │ └── package.json │ ├── package.json │ ├── package.json │ ├── pycalc/ │ ├── pycalc/ │ │ ├── api.py │ │0 码力 | 123 页 | 21.81 MB | 1 年前3TypeScript Handbook(中文版)
File,保持文件的默认名字 为 package.json 。 在 "devDependencies" 部分添加"gulp"和"del": "devDependencies": { "gulp": "3.9.0", "del": "2.2.0" } 保存这个文件后,Visual Studio将开始安装gulp和del。 若没有自动开始,请右击 package.json文件选择Restore 识了。 接下来,我们引 入Angular,写一个简单的Angular程序示例。 添加 Angular 2 使用 NPM 下载依赖的包 添加Angular 2和SystemJS到 package.json 的 dependencies 里。 对于VS2015,新的 dependencies 列表如下: TypeScript Handbook(中文版) 24 ASP.NET Core 现在让我们把这个文件夹转换成npm包: npm init 你将看到有一些提示操作。 除了入口文件外,其余的都可以使用默认项。 入口文 件使用 ./dist/main.js 。 你可以随时在 package.json 文件里更改生成的配 置。 TypeScript Handbook(中文版) 43 Gulp 安装依赖项 现在我们可以使用 npm install 命令来安装包。 首先全局安装0 码力 | 557 页 | 7.48 MB | 1 年前3[试读] Angular 5 高级编程
NPM 使用一个名为 package.json 的文件来获取项目所需的软件包列表。作为项目设置 的一部分,package.json 文件由 angular-cli 创建,但它只包含 Angular 开发所需的基本软件 包。本章中的示例应用程序需要 Bootstrap CSS 软件包,它并不是基本软件包集合的一部分。 在 todo 文件夹中编辑 package.json 文件以添加 Bootstrap Bootstrap CSS 软件包,如代码清单 2-1 所示。 代码清单 2-1 向 todo 文件夹中的 package.json 文件添加 Bootstrap CSS 软件包 { "name": "todo", "version": "0.0.0", "license": "MIT", "scripts": { "ng": "ng", "start": "ng serve" com,我会 尽力提供帮助。 package.json 文件列出了启动 Angular 开发所需的软件包和一些使用它们的命令。在第 11 章中将详细描述项目配置,这里只需要了解 package.json 文件的各节,如表 2-2 所示。 Angular 5 高级编程(第 2 版) 10 表 2-2 package.json 文件的各节 节的名称 描述 scripts0 码力 | 42 页 | 6.14 MB | 1 年前3TypeScript 4.0 使用手册
File,保持文件的默认名字为 package.json 。 在 "devDependencies" 部分添加”gulp”和”del”: 1. "devDependencies": { 2. "gulp": "3.9.0", 3. "del": "2.2.0" 4. } 保存这个文件后,Visual Studio将开始安装gulp和del。 若没有自动开始,请右击 package.json文件选择Restore 这就是你需要知道的在ASP.NET中使用TypeScript的基本知识了。 接下来,我们引入Angular,写 一个简单的Angular程序示例。 添加Angular 2和SystemJS到 package.json 的 dependencies 里。 对于VS2015,新的 dependencies 列表如下: 1. "dependencies": { 2. "angular2": "2 现在让我们把这个文件夹转换成npm包: 1. npm init 你将看到有一些提示操作。 除了入口文件外,其余的都可以使用默认项。 入口文件使 用 ./dist/main.js 。 你可以随时在 package.json 文件里更改生成的配置。 Gulp 创建简单工程 初始化工程 安装依赖项 Gulp - 38 - 本文档使用 书栈网 · BookStack.CN 构建 现在我们可以使用 npm0 码力 | 683 页 | 6.27 MB | 1 年前3electron中文教程
electron/Electron.app/Contents/Resources/app/ 2. ├── package.json 3. ├── main.js 4. └── index.html 在 Windows 和 Linux 中: 1. electron/resources/app 2. ├── package.json 3. ├── main.js 4. └── index.html 然后运行 JavaScript。相反,Electron 使用 web 页面作为它的 GUI,所 以你能把它看作成一个被 JavaScript 控制的,精简版的 Chromium 浏览器。 在 Electron 里,运行 package.json 里 main 脚本的进程被称为主进程。在主进程运行的脚本可以以创建 web 页面的形式展示 GUI。 由于 Electron 使用 Chromium 来展示页面,所以 Chromium 应用的目录结构如下: 1. your-app/ 2. ├── package.json 3. ├── main.js 4. └── index.html 快速入门 主进程 渲染进程 主进程与渲染进程的区别 打造你第一个 Electron 应用 快速入门 - 31 - 本文档使用 书栈(BookStack.CN) 构建 package.json 的格式和 Node 的完全一致,并且那个被0 码力 | 203 页 | 2.72 MB | 1 年前3RxJS Tutorial
proceed. Once the execution of npm init is done, it will create package.json inside rxjsproj/ as shown below: rxjsproj/ package.json Now you can install rxjs using below command: RxJS the folder structure as shown below: rxjsproj/ node_modules/ src/ package.json Inside src/ create a file testrx.js, and write the following code: testrx.js import { start the server to execute our Html file, we will use webpack-server. The command "publish" in package.json will help us start as well as pack all the js files using webpack . The packed js files which0 码力 | 106 页 | 1.56 MB | 1 年前3Gulp 入门指南
并将之前所有章节的内容组合起来编写一个前端项目所需的 gulp 代码。 你可以在 nimojs/gulp-demo 查看完整代码。 若你不了解npm 请务必阅读 npm模块管理器 package.json 如果你熟悉 npm 则可以利用 package.json 保存所有 npm install --save-dev gulp-xxx 模块依赖和 模块版本。 在命令行输入 npm init 会依次要求补全项目信息,不清楚的可以直接回车跳过 description: entry point: (index.js) test command: ... ... Is this ok? (yes) 最终会在当前目录中创建 package.json 文件并生成类似如下代码: gulp 入门指南 - 21 - 本文档使用 看云 构建 { "name": "gulp-demo", "version": "0.0.0", } 安装依赖 安装 gulp 到项目(防止全局 gulp 升级后与此项目 gulpfile.js 代码不兼容) npm install gulp --save-dev 此时打开 package.json 会发现多了如下代码 "devDependencies": { "gulp": "^3.8.11" } 声明此项目的开发依赖 gulp 接着安装其他依赖: 安装模块较多,请耐心等待,若一直安装失败可使用npm0 码力 | 36 页 | 275.87 KB | 1 年前3The Next.js Handbook
that name), then downloads all the packages it needs ( react , react- dom , next ), sets the package.json to: 9 and you can immediately run the sample app by running npm run dev : 10 And here's project, populating a sample package.json file. Now install Next and React: npm install next react react-dom Your project folder should now have 2 files: package.json (see my tutorial on it) package-lock the current folder in the editor (if the command does not work for you, see this) 14 Open package.json , which now has this content: { "name": "firstproject", "version": "1.0.0", "description":0 码力 | 54 页 | 2.61 MB | 1 年前3Learning Gulp
Automation with Gulpjs -1 of 2 11 Syntax 11 Remarks 11 Examples 11 Loading All The Plugins from Package.JSON 11 Note 11 NOTE 12 Installing Plugins for Responsive images|Css Minification|Js minification Loading All The Plugins from Package.JSON Assuming , you have a grasp of how to install gulp, let us dive right down to requiring all the gulp- dependencies from package.json under your projects root folder gulp-load-plugins, and call it gulp-load-plugins will require individually, all the plugins installed in package.json at the root directory these required plugins, are lazy loaded that is, gulp-load-plugins will0 码力 | 45 页 | 977.19 KB | 1 年前3
共 28 条
- 1
- 2
- 3