This is an automated email from the ASF dual-hosted git repository. erisu pushed a commit to branch chore/improve-ci-test-build in repository https://gitbox.apache.org/repos/asf/cordova-node-xcode.git
commit 8db088df47eab5f456bf4038d50a64206b32bab6 Author: Erisu <[email protected]> AuthorDate: Fri Jun 12 16:08:44 2026 +0900 chore: add DEVELOPMENT.md --- DEVELOPMENT.md | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 16 --------- 2 files changed, 105 insertions(+), 16 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md new file mode 100644 index 0000000..50997d9 --- /dev/null +++ b/DEVELOPMENT.md @@ -0,0 +1,105 @@ +<!-- +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +--> + +# Development + +## Setup + +1. Install npm dependencies. + + ```bash + npm install + ``` + +## Updating the parser + +If there's a problem parsing, you will want to edit the grammar under `lib/parser/pbxproj.pegjs`. + +Tests under the `test/parser` directory will compile the parser from the grammar. The other tests will use the prebuilt parser (`lib/parser/pbxproj.js`). + +To build the parser js file after editing the grammar, run: + +```bash +npm run build +``` + +## Unit Testing + +Our projects include unit tests, which can be run with: + +```bash +npm test +``` + +## Linting + +During development, you should run the linter to ensure the code follows our coding standards: + +```bash +npm run lint +``` + +> [!NOTE] +> Running `npm test` will also execute the linter before running the tests. + +### Fixing Lint Issues + +In many cases, lint warnings can be fixed automatically with: + +```bash +npm run lint:fix +``` + +If an issue cannot be resolved automatically, it will require manual review and correction. + +## Building from Source + +1. **Clone the repository** locally. + +2. **Change to the repository directory.** + +3. **Install dependencies:** + + ```bash + npm install + ``` + + Installs all production and development dependencies required for using and developing the package. + +4. **Update sub-dependencies:** + + ```bash + npm update + ``` + + Over time, `package-lock.json` can become stale and may trigger audit warnings. `npm update` refreshes dependencies within the pinned versions. + + Under normal circumstances, users install the published package from the npm registry, which does **not** include its own `package-lock.json`. Instead, npm resolves and installs the latest compatible dependency versions at install time, which may result in no audit warnings. + + Running `npm update` locally can provide a more accurate representation of current npm audit results for the project. + +5. **Generate a tarball:** + + ```bash + npm pack + ``` + + Creates a `.tgz` tarball file in the `.asf-release` directory. diff --git a/README.md b/README.md index a4bc8ed..6cd82a9 100644 --- a/README.md +++ b/README.md @@ -54,22 +54,6 @@ myProj.parse(function (err) { }); ``` -## Working on the parser - -If there's a problem parsing, you will want to edit the grammar under -`lib/parser/pbxproj.pegjs`. You can test it online with the PEGjs online thingy -at https://pegjs.org/online - I have had some mixed results though. - -Tests under the `test/parser` directory will compile the parser from the -grammar. Other tests will use the prebuilt parser (`lib/parser/pbxproj.js`). - -To rebuild the parser js file after editing the grammar, run: - - npm run pegjs - -(and be sure to restore the Apache license notice in -`lib/parser/pbxproj.js` before committing) - ## License Apache V2 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
