0.2.7 • Published 9 months ago

rub-cli v0.2.7

Weekly downloads
27
License
GPL-3.0
Repository
github
Last release
9 months ago

rub-cli

Extends the grunt commands which come with Adapt Framework.

Support

Supports only Adapt versions >=4

Installation

Please make sure you leave the following files and folders in your development folder:

node_modules (if it's there)
grunt

Then run npm install -g rub-cli grunt-cli

N.B. it is critical to install grunt-cli otherwise the commands may fail silently.

Execute

Run rub dev

$ rub help

Adapt Buildkit (rub-cli)

  Usage: rub [options] [courses...]

  Options:

    -V, version          display version numbers     
    -h, help             display this help text      
    -v, verbose          verbose output
    -f, force            force rebuild
    -F, forceall         force clean then rebuild    
    -p                   number of parallel tasks (2)
    -c, clean            clean output folder
    tracking:insert      add block tracking ids      
    tracking:remove      remove block tracking ids
    tracking:reset       reset block tracking ids
    -j, json             process json
    -M, minify           minify json
    -P, prettify         prettify json
    -b, build            production build (no sourcemaps, with uglify)
    -d, dev              development build (with sourcemaps, no uglify)
    -U, uglify           uglify js
    -z, zip              zip output folders
    -Z, zipaat           zip for import to AAT
    -r, redundantassets  check for redundant assets
    -t, techspec         check assets against techspec
    -C, compress         compress images
    -w, watch            watch for changes
    -s, server           run server environment
    translate:export     export translatable text
    translate:import     import translated text
    -W, wait             wait for keypress
  Finished.

Tech Spec

  1. Run rub techspec
  2. Edit techspec.json
  3. Run rub techspec

Including/excluding plugins

If one (or more) of your modules only uses a subset of the installed plugins, you can specify which should be included by adding the following to the config.json for that module:

"build": {
	"includes": [
		"adapt-contrib-media",
		"adapt-contrib-narrative",
		"adapt-contrib-bookmarking",
		"adapt-contrib-pageLevelProgress",
		"adapt-quicknav"
	]
}

Changing .json file endings

Add to Adapt framework package.json

    "grunt": {
        "options": {
            "jsonext": "txt"
        }
    }

Changing course folder name

Add to Adapt framework package.json

    "grunt": {
        "options": {
            "coursedir": "alternative"
        }
    }

IMSMANIFEST.XML variable replacement

@@course.title
@@course.customName.subAttributeName
@@config.anyOtherName

You can only use variables from config and course.

Tracking Ids

These three commands (tracking:remove, tracking:insert and tracking:remove) will change the src/course if you’re using the Adapt Learning structure, or the builds/moduleName/course/ files otherwise.

Flags vs commands vs options

Commands will typically run at the exclusion of all other non-dependent tasks, such that rub prettify will only perform a json prettification task. Flags now assume a build should happen, such that rub -P will build and prettify, rub -Pz will build, prettify and zip, etc. Options specify a value, such as rub -p=10, to allow 10 parallel tasks.

Migrating from adapt-cli to rub

In order to use rub, your Adapt project's folder structure will require a few changes.

  1. Create a builds folder in the root of your project.
  2. Create a folder inside the builds folder using your module name (e.g. `p101).
  3. Move the contents of the 'src/course' folder into 'builds/p101/course'. Then, remove 'src/course' entirely.
  4. Finally, run rub dev p101 to build.
0.2.7

9 months ago

0.2.6

9 months ago

0.2.5

9 months ago

0.2.3

1 year ago

0.2.4

1 year ago

0.1.14-beta.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.2.2

2 years ago

0.1.12

3 years ago

0.1.11

3 years ago

0.1.10

3 years ago

0.1.9

3 years ago

0.1.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.0.46

3 years ago

0.0.44

4 years ago

0.0.45

4 years ago

0.0.43

4 years ago

0.0.42

4 years ago

0.0.41

4 years ago

0.0.40

5 years ago

0.0.39

5 years ago

0.0.38

5 years ago

0.0.37

5 years ago

0.0.36

5 years ago

0.0.35

6 years ago

0.0.34

6 years ago

0.0.33

6 years ago

0.0.32

6 years ago

0.0.31

6 years ago

0.0.30

6 years ago

0.0.29

6 years ago

0.0.26

6 years ago

0.0.25

6 years ago

0.0.24

6 years ago

0.0.23

6 years ago

0.0.22

6 years ago

0.0.21

6 years ago

0.0.20

7 years ago

0.0.19

7 years ago

0.0.18

7 years ago

0.0.17

7 years ago

0.0.16

7 years ago

0.0.15

7 years ago

0.0.14

7 years ago

0.0.13

7 years ago

0.0.12

7 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago