Grammalecte  Check-in [e62a1b8a62]

Overview
Comment:[njs][build] Add command to create file to distrib and ajust package.json
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | nodejs
Files: files | file ages | folders
SHA3-256: e62a1b8a62035e2bc3f157a0973c78c8e0c2ed3a734a25b5d9ba4cce98b96d2d
User & Date: IllusionPerdu on 2018-10-22 23:31:14
Other Links: branch diff | manifest | tags
Context
2018-10-22
23:31
[njs][build] Add command to create file to distrib and ajust package.json Leaf check-in: e62a1b8a62 user: IllusionPerdu tags: nodejs
18:50
[njs] Load personal dic error argument when is json check-in: 4cffd5d5c6 user: IllusionPerdu tags: nodejs
Changes

Modified gc_lang/fr/build.py from [d49776adfe] to [fcaba47e9b].

1
2
3

4
5
6
7
8
9
10
# Builder for French language

import os

import platform
import zipfile
from distutils import dir_util, file_util

import helpers





>







1
2
3
4
5
6
7
8
9
10
11
# Builder for French language

import os
import subprocess
import platform
import zipfile
from distutils import dir_util, file_util

import helpers


87
88
89
90
91
92
93

94
95
96











            hZip.write("grammalecte-js/graphspell/_dictionaries/"+sf, sAddPath+"grammalecte-js/graphspell/_dictionaries/"+sf)
    for sf in os.listdir(spLangPack):
        if not os.path.isdir(spLangPack+"/"+sf):
            hZip.write(spLangPack+"/"+sf, sAddPath+spLangPack+"/"+sf)


def createNodeJSPackage (sLang):

    helpers.createCleanFolder("_build/nodejs/"+sLang)
    dir_util.copy_tree("gc_lang/"+sLang+"/nodejs/", "_build/nodejs/"+sLang)
    dir_util.copy_tree("grammalecte-js", "_build/nodejs/"+sLang+"/core/grammalecte")


















>



>
>
>
>
>
>
>
>
>
>
>
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
            hZip.write("grammalecte-js/graphspell/_dictionaries/"+sf, sAddPath+"grammalecte-js/graphspell/_dictionaries/"+sf)
    for sf in os.listdir(spLangPack):
        if not os.path.isdir(spLangPack+"/"+sf):
            hZip.write(spLangPack+"/"+sf, sAddPath+spLangPack+"/"+sf)


def createNodeJSPackage (sLang):
    print("Building for NodeJS")
    helpers.createCleanFolder("_build/nodejs/"+sLang)
    dir_util.copy_tree("gc_lang/"+sLang+"/nodejs/", "_build/nodejs/"+sLang)
    dir_util.copy_tree("grammalecte-js", "_build/nodejs/"+sLang+"/core/grammalecte")
    corePack = ""
    cliPack = ""
    with helpers.cd("_build/nodejs/"+sLang):
        corePack = subprocess.check_output("npm pack ./core", shell=True)
    with helpers.cd("_build/nodejs/"+sLang+"/cli"):
        subprocess.check_output("npm --no-save install ../"+corePack.decode("utf-8").split('\n', 1)[0], shell=True)
    with helpers.cd("_build/nodejs/"+sLang):
        cliPack = subprocess.check_output("npm pack ./cli", shell=True)
    print("Fichiers à distribuer:")
    print(" pour le dev: "+corePack.decode("utf-8").split('\n', 1)[0])
    print(" pour une installation du client: "+cliPack.decode("utf-8").split('\n', 1)[0])

Modified gc_lang/fr/nodejs/cli/package.json from [e0a3054dc0] to [f8481eb512].

1
2
3
4
5
6
7
8
9
10
11
12
13




14
15
16
17
18
19
20
21
22
23
24
25



26
27
28
29
30
31
32
{
  "name": "grammalecte-cli",
  "version": "1.0.0",
  "description": "Grammalecte command line interface",
  "keywords": [
    "cli",
    "french",
    "grammar",
    "proofreader"
  ],
  "author": "Sébastien GRAVIER, Olivier R.",
  "license": "GPL-3.0-or-later",
  "homepage": "https://www.dicollecte.org/",




  "bin": {
    "gramma-cli": "bin/gramma-cli.js"
  },
  "engines": {
    "node": ">=9.0.0"
  },
  "scripts": {
    "test": "node bin/gramma-cli.js"
  },
  "dependencies": {
    "grammalecte": "~1.0.0"
  },



  "files": [
    "bin",
    "lib",
    "data",
    "readme.md"
  ]
}











|

>
>
>
>












>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{
  "name": "grammalecte-cli",
  "version": "1.0.0",
  "description": "Grammalecte command line interface",
  "keywords": [
    "cli",
    "french",
    "grammar",
    "proofreader"
  ],
  "author": "Sébastien GRAVIER, Olivier R.",
  "license": "GPL-3.0",
  "homepage": "https://www.dicollecte.org/",
  "repository": {
    "type" : "fossil",
    "url" : "http://212.47.254.152:8080/index"
  },
  "bin": {
    "gramma-cli": "bin/gramma-cli.js"
  },
  "engines": {
    "node": ">=9.0.0"
  },
  "scripts": {
    "test": "node bin/gramma-cli.js"
  },
  "dependencies": {
    "grammalecte": "~1.0.0"
  },
  "bundledDependencies": [
    "grammalecte"
  ],
  "files": [
    "bin",
    "lib",
    "data",
    "readme.md"
  ]
}

Modified gc_lang/fr/nodejs/core/package.json from [fbedcd1684] to [4ad18d1310].

1
2
3
4
5
6
7
8
9
10
11
12




13
14
15
16
17
18
19
{
  "name": "grammalecte",
  "version": "1.0.0",
  "description": "Grammalecte is a grammar proofreader",
  "keywords": [
    "french",
    "grammar",
    "proofreader"
  ],
  "author": "Olivier R.",
  "license": "GPL-3.0-or-later",
  "homepage": "https://www.dicollecte.org/",




  "main": "api.js",
  "engines": {
    "node": ">=9.0.0"
  },
  "scripts": {
    "test": "echo \"Error: no test specified\""
  }










|

>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
  "name": "grammalecte",
  "version": "1.0.0",
  "description": "Grammalecte is a grammar proofreader",
  "keywords": [
    "french",
    "grammar",
    "proofreader"
  ],
  "author": "Olivier R.",
  "license": "GPL-3.0",
  "homepage": "https://www.dicollecte.org/",
  "repository": {
    "type" : "fossil",
    "url" : "http://212.47.254.152:8080/index"
  },
  "main": "api.js",
  "engines": {
    "node": ">=9.0.0"
  },
  "scripts": {
    "test": "echo \"Error: no test specified\""
  }