1.0.55 • Published 5 years ago

noct v1.0.55

Weekly downloads
52
License
MIT
Repository
-
Last release
5 years ago

Nocturn CLI

noct is a tool to build Nocturn projects from the command line.

Getting Started

npm install -g noct

Dependencies

Component Markup Language

Creating a Nocturn project

Create a Nocturn project in the current directory

noct init

Project files and directories

app.json

The app.json file contains configuration data for the project. A basic app.json file will be generated after "noct init" and can be modified directly after.

{
  "name": <project name>,
  "displayName": <display name, shows up in title tag>,
  "start": <main module (first module loaded)>,
  "uiVersion": <version of nocturn-ui.js to use>,
  "cmlVersion": <version of cml-runtime.js to use>,
  "plugins": [{
      "name": <plugin name>,
      "type": <file type, ie javascript, css>,
      "url": <path to plugin, can be a local path or an url>
    },
    ...
  ],
  "modules": [
    <module name>,
    ...
  ]

  // PWA Properties
  "includeRuntime": <true (include runtime files locally), false (use cdn url)>,
  "includeManifest": <true (include manifest.json file), false (default, don't include)>,
  "includeServiceWorker": <true (include serviceworker.js file), false (default, don't include)>,
  "themeColor": <color theme for app>,
  "icons": [
    {
      "src": <icon image>,
      "type": "image/png",
      "sizes": "192x192"
    },
    {
      "src": <icon image>,
      "type": "image/png",
      "sizes": "512x512"
    }
  ],
  "background_color": <loading screen color>,
  "display": "standalone",
  "cacheList": [
      <url to cache in serviceworker.js>
      ...
  ]
}

Some properties in the app.json file are used to generate manifest and serviceworker files. These files are necessary to make your app a Progressive Web App (PWA).

PWA Properties

index.html

Nocturn projects compiles into a single html file. Code in index.html is generated from modules and information from the app.json. The file index.html will include all other resource used by the single page app.

cml directory

This directory is where the projects cml files are stored. In the project.json file a referenced module name should match a file name in the cml directory.

js directory

This directory is where the compiled js files for the project will be placed.

Building a Nocturn project

Build the Nocturn project in the current directory.

noct build

Check version of cml noct is building using.

noct build -v

or

noct build --version

Editing Modules

Nocturn projects are composed of Modules. You can add or remove modules from the project by editing app.json or by using cli commands.

Creating Modules

create a new module with a template

noct create -t Card.cml exampleCard.cml

Templates

  • Module.cml
  • Card.cml
  • NavBar.cml
  • SideNav.cml
  • Banner.cml
  • Modal.cml
  • Footer.cml
  • FAB.cml

Adding Modules

add all modules in the cml directory

noct add -all

or

noct add -a

add a specific module from the cml directory, in this case "exampleModule"

noct add exampleModule

Removing Modules

remove a specific module from the project, in this case "exampleModule". The module will still be available in the directory, the file will not be deleted.

noct remove exampleModule

remove all modules from the project. All modules in the cml directory will stay available; they will not be deleted.

noct remove -a
1.0.55

5 years ago

1.0.54

5 years ago

1.0.52

5 years ago

1.0.51

5 years ago

1.0.50

5 years ago

1.0.48

5 years ago

1.0.47

5 years ago

1.0.46

5 years ago

1.0.45

5 years ago

1.0.44

5 years ago

1.0.43

5 years ago

1.0.42

5 years ago

1.0.41

5 years ago

1.0.40

5 years ago

1.0.39

5 years ago

1.0.38

5 years ago

1.0.37

5 years ago

1.0.36

5 years ago

1.0.35

5 years ago

1.0.34

5 years ago

1.0.33

5 years ago

1.0.32

5 years ago

1.0.31

5 years ago

1.0.30

5 years ago

1.0.29

5 years ago

1.0.28

5 years ago

1.0.27

5 years ago

1.0.26

5 years ago

1.0.25

5 years ago

1.0.24

5 years ago

1.0.23

5 years ago

1.0.22

5 years ago

1.0.21

5 years ago

1.0.20

5 years ago

1.0.17

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago