这是indexloc提供的服务,不要输入任何密码
Skip to content

Fix Lifecycle scripts on Installation #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 553 commits into from
Nov 16, 2019
Merged

Fix Lifecycle scripts on Installation #6

merged 553 commits into from
Nov 16, 2019

Conversation

Chetabahana
Copy link

@Chetabahana Chetabahana commented Nov 16, 2019

Checklist

  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

package.json

{
  "name": "three.graphql",
  "version": "0.1.2",
  "description": "Create & Query THREE objects with GraphQL",
  "author": "Chetabahana <chetabahana@gmail.com>",
  "developer": "Joseph Werle <werle@littlstar.com>",
  "license": "MIT",
  "main": "index.js",
  "keywords": [
    "three",
    "graphql"
  ],
  "dependencies": {
    "browserify": "^16.5.0",
    "core-js": "^3.4.1",
    "debug": "^4.1.1",
    "domready": "^1.0.8",
    "glob": "^7.1.6",
    "graph": "^0.2.0",
    "graph.ql": "^2.0.2",
    "three": "^0.110.0"
  },
  "devDependencies": {
    "brfs": "^2.0.2",
    "budo": "^11.6.3",
    "graphql": "^14.5.8",
    "graphiql": "^0.15.1",
    "react": "^16.11.0",
    "react-dom": "^16.11.0"
  },
  "scripts": {
    "preinstall": "bash scripts/preinstall.sh",
    "install": "bash scripts/install.sh",
    "postinstall": "bash scripts/postinstall.sh",
    "audit": "bash scripts/audit.sh",
    "build": "npm run build:editor",
    "editor": "npm run build:editor && budo",
    "build:editor": "bash scripts/build.sh",
    "test": "bash scripts/test.sh"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/chetabahana/node",
    "source": "https://github.com/jwerle/three.graphql"
  }
}

shell script

#!/bin/bash

cd $WORKSPACE/test/fixtures/three.graphql

echo -e "\n$hr\nCYCLE\n$hr"
# https://makefiletutorial.com/
make

echo -e "\n$hr\nPREINSTALL\n$hr"
# https://stackoverflow.com/a/40814801/4058484
npm install -f

echo -e "\n$hr\nAUDIT FIX\n$hr"
# https://docs.npmjs.com/cli/audit
make audit

echo -e "\n$hr\nBUILD\n$hr"
#https://gist.github.com/kvz/79554af7f2d1b1379536
make build

echo -e "\n$hr\nDEBUG\n$hr"
# https://docs.npmjs.com/cli/run-script
make test

Lifecycle scripts

npm run 
Lifecycle scripts included in three.graphql:
  preinstall
    bash scripts/preinstall.sh
  install
    bash scripts/install.sh
  postinstall
    bash scripts/postinstall.sh
  test
    bash scripts/test.sh

available via `npm run-script`:
  audit
    bash scripts/audit.sh
  build
    npm run build:editor
  editor
    npm run build:editor && budo
  build:editor
    bash scripts/build.sh

screenshot

capture

@Chetabahana Chetabahana merged commit bb8185f into Chetabahana Nov 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants