Socket
Socket
Sign inDemoInstall

grunt-ws-rjs-builder

Package Overview
Dependencies
1
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    grunt-ws-rjs-builder

Паковка sbis3 модулей и зависимостей помощью r.js


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
1.22 MB
Created
Weekly downloads
 

Readme

Source

grunt-ws-rjs-builder

Паковка sbis3 модулей и зависимостей помощью r.js

Как пользоваться?

Если вы не пользовались Grunt, то стоит прочитать небольшой мануал Getting Started. В нем описано как создать Gruntfile, как устанавливать и использовать плагины для Grunt.

Для установки плагина используйте команду ниже:

npm install grunt-ws-rjs-builder --save-dev

После того как плагин установлен он становится доступен в вашем Grunfile:

grunt.loadNpmTasks('grunt-ws-rjs-builder');

Запустите задачу с помощью команды

grunt ws-rjs-build

Таски и опции могут быть указаны в соответствии с мануалом Configuring tasks

Опции

root - корень приложения* ws - путь до папки ws относительно корня приложения (по умолчанию ws) resources - путь до ресурсов относительно корня приложения (по умолчанию resources) paths - дополнительный мапинг для модулей name - имя основного модуля, для которого собираются зависимости* include - список дополнительных модулей, которые необходимо включить в пакет out - имя выходного файла относительно корня приложения*

* - обязательные параметры

Пример

Gruntfile.js

var path = require('path');

module.exports = function (grunt) {
   grunt.initConfig({
      "pkg": grunt.file.readJSON('package.json'),
      "rjs-build": {
         data: {
            root: __dirname,
            ws: 'ws',
            resources: 'static',
            paths: {
               'webrtc' : 'static/startup'
            },
            name: 'webrtc!js!SBIS3.WebRTC.Listener',
            include: [
               'webrtc!js!SBIS3.WebRTC.Report',
               'webrtc!js!SBIS3.WebRTC.DataProvider',
               'webrtc!js!SBIS3.WebRTC.Manager',
               'webrtc!js!SBIS3.WebRTC.GUI'
            ],
            out: "static/build/main.min.js"
         }
      }
   });

   grunt.loadNpmTasks('grunt-ws-rjs-builder');

   grunt.registerTask('default', ['rjs-build']);
};

После успешного выполнения таска мы получим 2 пакета static/build/main.min.js и static/build/main.min.css

FAQs

Last updated on 14 Oct 2015

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