Have ideas to improve npm?Join in the discussion! »

gnextia

42.0.1 • Public • Published

gnextia

Create fast web application :)

  • webpack
  • babel
  • react
  • sass
  • Image version
  • i18n
  • Build environment (develop, beta and master)
  • Gitlab CI/CD
To start
sudo npm -g i gnextia

# sudo npm -g i gnextia --unsafe-perm=true
Create web project
npx gnextia webapp
# or
gnextia webapp

cd webapp
npm i
npm run now # start web application
npm start # with git branch develop
gnextia commands
# start web application in localhost with "git branch develop"
npm start
# start web application
npm run now

# clean project
npm run clean

# Create new page or component
npm run page PageName
npm run component ComponentName

# Create environemnt in dist directory
npm run develop
npm run beta
npm run master
husky
#  husky reinstall
npm rebuild

# husky > pre-commit hook failed (add --no-verify to bypass)
git commit -m "..." --no-verify
gnextia ports
name port
api 4000
apis... 400...
- -
webpage 3000
login 3001
portal 3002
app 3003
sandbox 3004
webapps... 300...
- -
landingpages... 303...
brochures.... 303...
Image version
import {  Img, img } from "@gnextia"

<Img src="img/logo.svg" />
// to html
<img src="img/logo.svg?<VERSION>" />

const myImg = img("img/logo.svg")
// to
const myImg =  "img/logo.svg?<VERSION>"
background: img('/public/img/logo.svg') no-repeat fixed center;
/* to css */
background: url('/public/img/logo.svg?<VERSION>') no-repeat fixed center;
use config
import { config } from '@gnextia'
console.info(config)
i18n (Internationalization and localization)
# config.yml
i18n:
  default: en
  list:
    - en
    - es
# i18n.yml
user:
  name:
    - My name is {0} {1} {2}
    - Mi nombre es {0} {1} {2}
import { I18n, i18n } from '@gnextia'

// jsx
<I18n name="user.name" args={['Sinuhe', 'Maceda', 'Bouchan']} />
// js
i18n('user.name', ['Sinuhe', 'Maceda', 'Bouchan'])
Use Internal IP in config.yml
localhost:
  myIp: @{MY_IP}
Merge toAll to all environemnts in config.yml
toAll:
  msg: hello world
Build environment

Webpack develop and debug

npm run start
npm run develop
npm run beta

Webpack production and optimized

npm run master
Run http-server on dist directory
http-server dist -p 3000
To start Gitlab CI
npm run gitlab-ci
CI / CD Settings : Group variables
Key : CLOUD
# CLOUD

CLOUD = AWS
# CLOUD = GCP
# CLOUD = FIREBASE

# CLOUDFLARE

CLOUDFLARE_MAIL=gnextia@gmail.com
CLOUDFLARE_DOMAIN=gnextia.com
CLOUDFLARE_API_KEY=
CLOUDFLARE_ZONE_ID=

# TELEGRAM

TELEGRAM_TOKEN=
TELEGRAM_CHAT_ID=(
123456789 # Sinuhe
)
Key : AWS_DEVELOPMENT
# AWS

AWS_DEVELOPMENT_AWS_DEFAULT_REGION=
AWS_DEVELOPMENT_AWS_ACCESS_KEY_ID=
AWS_DEVELOPMENT_AWS_SECRET_ACCESS_KEY=

# API

AWS_DEVELOPMENT_CLOUDFRONT_DEVELOP_API=
AWS_DEVELOPMENT_CLOUDFRONT_BETA_API=

# WEB

AWS_DEVELOPMENT_S3_BUCKET=
AWS_DEVELOPMENT_CLOUDFRONT_DEVELOP=
AWS_DEVELOPMENT_CLOUDFRONT_BETA=
Key : AWS_PRODUCTION
# AWS

AWS_PRODUCTION_AWS_DEFAULT_REGION=
AWS_PRODUCTION_AWS_ACCESS_KEY_ID=
AWS_PRODUCTION_AWS_SECRET_ACCESS_KEY=

# API

AWS_PRODUCTION_CLOUDFRONT_MASTER_API=

# WEB
AWS_PRODUCTION_S3_BUCKET=
AWS_PRODUCTION_CLOUDFRONT_MASTER=

Type : File

Flags / Protect variable : False

Screenshot

VARIABLES

Keywords

Install

npm i gnextia

DownloadsWeekly Downloads

664

Version

42.0.1

License

MIT

Unpacked Size

67.7 kB

Total Files

31

Last publish

Collaborators

  • avatar