1.0.43 ā€¢ Published 2 years ago

tiapp-dir v1.0.43

Weekly downloads
8
License
MIT
Repository
github
Last release
2 years ago

šŸ‘‰ Ā Ā  A group of Axway employees, ex-Axway employees, and some developers from Titanium community have created a legal org and now officially decide all matters related to future of these products.

API FAQ:

Ā 

Click to watch on Youtube

Ā  ā†‘ Watch video on YouTube ā†‘

Ā 

tiapp-dir

tiapp-dir version tiapp-dir downloads tiapp-dir dependencies

Find the root directory of an appcelerator titanium project

(based on https://github.com/sindresorhus/pkg-dir)

Install

$ npm install --save tiapp-dir

Install NPM version

$ npm install--save tiapp-dir

Usage

/
ā””ā”€ā”€ projects
    ā””ā”€ā”€ appcelerator
        ā””ā”€ā”€ mobilehero-demo
            ā”œā”€ā”€ package.json
            ā”œā”€ā”€ tiapp.xml
            ā””ā”€ā”€ foo
                ā”œā”€ā”€ aaa.js
                ā”œā”€ā”€ package.json
                ā””ā”€ā”€ bar
                    ā”œā”€ā”€ bbb.js
                    ā”œā”€ā”€ ccc.js
                    ā””ā”€ā”€ example.js
// example.js
var tiappDir = require('tiapp-dir');

tiappDir(__dirname).then(function (rootPath) {
	console.log(rootPath);
	//=> '/projects/appcelerator/mobilehero-demo'
});

API

tiappDir(cwd)

Returns a promise that resolves to the project root path or null.

tiappDir.sync(cwd)

Returns the project root path or null.

cwd

Type: string
Default: process.cwd()

Directory to start from.

Related

  • pkg-dir - Find the root directory of a npm package
  • pkg-up - Find the closest package.json file
  • find-up - Find a file by walking up parent directories

License

The MIT License (MIT)

Copyright (c) 2016 Superhero Studios Incorporated

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.
1.0.43

2 years ago

1.0.42

2 years ago

1.0.41

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.39

2 years ago

1.0.17

2 years ago

1.0.38

2 years ago

1.0.16

2 years ago

1.0.9

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.40

2 years ago

1.0.22

2 years ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.26

2 years ago

1.0.25

2 years ago

1.0.24

2 years ago

1.0.23

2 years ago

1.0.29

2 years ago

1.0.28

2 years ago

1.0.27

2 years ago

1.0.33

2 years ago

1.0.11

2 years ago

1.0.32

2 years ago

1.0.10

2 years ago

1.0.31

2 years ago

1.0.30

2 years ago

1.0.37

2 years ago

1.0.15

2 years ago

1.0.36

2 years ago

1.0.14

2 years ago

1.0.35

2 years ago

1.0.13

2 years ago

1.0.34

2 years ago

1.0.12

2 years ago

1.0.1

5 years ago

1.0.0

7 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

9 years ago

0.0.1

9 years ago