npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

n4-simple-build

v1.0.1

Published

Simple N4 module build & Lexicon handling tool

Downloads

51

Readme

n4-simple-build

Simple N4 module build & Lexicon handling tool

NPM Version NPM Downloads GitHub node-lts Donate

Description

Node.JS module to build simple N4 Framework modules.
For simple ressource modules which do not need java files or which not require a java compiler.
It also is able to extract original (english) lexicon files from N4 java modules and can create CSV-files for translation into different languages.
It can re-import translated CSV-files for building simple Lexicon modules for N4.

Installation

npm i -g n4-simple-build

Basic Usage

Commands are following this format:

n4-simple-build <command> [options]

Get Help from Tool

Get a full list of commands

n4-simple-build --help

Check the version

n4-simple-build --version

Initialize Project

For starting a new project, you must use the init command to initialize current working path.
This will create basic folders and files for later usage

n4-simple-build init

Create Ressource module

Simply Add your files into the src or rc folder

Edit config

You can use the config-ls, config-add, config-rm and config-set command to modify the config, like the dependecies or the version. You can get more detailed info about this commands by using the --help command.

Build module

If you're ready then you can simply create a module by running the build command

n4-simple-build build

Note: The build command will iterate the build version each time you execute it (except for if you edit the version of the module).

If you're project includes web files like js, html or css they get minified unless you choose the option --no-minify.

Lexicon file handling

Extracting base Lexicon files from a absolute or relative directory into the lex-base folder. Note: If there are multiple files of the same module, these lexicon files get combined.

n4-simple-build lexicon --extract-base-files "C:/Brand/N4.x.x.x/modules"

Then you can use the export command to create a csv file for easy editing of each module.
You will find these files in the lex-export folder.
The CSV file will start in the first row with the lexicon key followed by a row with the english text.
You can add a row with a language tag ad the first line (e.g. de) for a specific langauage.
You can add multiple languages if you wish to.
Export CSV-files for every base module lexicon file

n4-simple-build lexicon --csv-export

After editing you can put your CSV files into the lex-import and import them. Special characters will automatically converted, so N4 will understand them. Import CSV-files into source folder

n4-simple-build lexicon --csv-import

Then you can use the build command

Folder strucutre

Root
├───buildConfig.json   --> Configuration of the project
├───.temp   --> Temporary folder for extracting lexicon files.
├───output  --> Output folder for finished jar-files
├───signed  --> Modules that have been signed
├───module  --> Module base folder
│   ├───.build  -->  Temporary build folder
│   ├───META-INF 
|   |   └───module.json  --> stores data to generate meta data
│   └───src  --> Source files that need to be copied
│       └───rc  --> Resources
├───lex-base    --> Base lexicon files from other modules
├───lex-export  --> CSV Export path for lexicon files
└───lex-import  --> CSV Import path for lexicon files

License

Copyright (c) 2023-2024 Marina Egner (sheepcs.de). This is free software and may be redistributed under the terms specified in the LICENSE file.