0.1.27 • Published 2 years ago

suitescript-generator v0.1.27

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

SuiteScript Generator

Install from NPM

Run:

npm install suitescript-generator

After installation the config folder will be created in your project root directory.

Destination folder config

Go to config/default.json and set the paths where the generated SuiteScripts files will be stored including the default author name and the file name will contain pre-defined prefix and suffix for each script type

{
    "scriptPaths": {
        "defaultPath": "./generatedScripts/",
        "uePath": "./generatedScripts/UserEvent/",
        "clPath": "./generatedScripts/Client/",
        "mrPath": "./generatedScripts/MapReduce/",
        "slPath": "./generatedScripts/Suitelet/",
        "wfaPath": "./generatedScripts/WorkflowAction/"
    },
    "userDetails": {
        "defaultAuthorName": "Jan Novak",
    },
    "fileOptions": {
        "scriptPrefix_UE": "xyz_",
        "scriptSuffix_UE": "_UE",
        "scriptPrefix_CL": "xyz_",
        "scriptSuffix_CL": "_CL",
        "scriptPrefix_MR": "xyz_",
        "scriptSuffix_MR": "_MR",
        "scriptPrefix_WFA": "xyz_",
        "scriptSuffix_WFA": "_WFA",
        "scriptPrefix_SL": "xyz_",
        "scriptSuffix_SL": "_SL"
    }
}

Package.json config (optional)

Go to package.json and add following line to scripts section:

{
    "suitescript-generator": "node node_modules/suitescript-generator/index.js"
}

First time use - Interactive mode use:

$ npm run suitescript-generator

The interactive guide will popup. Select the script type, provide your credentials and info. App will then create a new SuiteScript script file with the information in the folder defined in the config file.

First time use - Non-interactive mode use:

$ npm run suitescript-generator -- -n <author_name> -s <script_name> -t <script_type> -d <script_description>

Using the parameters you can create a script without interactive mode on single line. If the author_name is defined in the config, it can be excluded.

For the script type parameter, use following:

  • Client Script
  • User Event
  • Map Reduce
  • Workflow Action
  • Suitelet

Still need help?:

$ npm run suitescript-generator -- --help

Using -help param you can list all the required params

Soon to be implemented:

  • Company / Dev Copywright section
  • Default Prefix / Suffix for script files names
  • Additional Script Types
  • Support for library files
  • Provided values validation
  • Multiple scripts creation in one run
  • Improved installation experience
    • Config wizard?

License

(The MIT License)

Copyright (c) 2022 Michal Tvrdy mich.tvrdy@gmail.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0.1.27

2 years ago

0.1.26

2 years ago

0.1.25

2 years ago

0.1.24

2 years ago

0.1.23

2 years ago

0.1.22

2 years ago

0.1.21

2 years ago

0.1.20

2 years ago

0.1.19

2 years ago

0.1.18

2 years ago

0.1.17

2 years ago

0.1.16

2 years ago

0.1.15

2 years ago

0.1.14

2 years ago

0.1.13

2 years ago

0.1.12

2 years ago

0.1.11

2 years ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago