Commit Graph

759 Commits

Author SHA1 Message Date
Zak Patterson
59e0de7650
Fix cli no prompt for app-name cli arg (#980)
* Fix cli no prompt for app-name cli arg

* Add change file
2020-08-19 14:37:46 -05:00
Jacob Bolda
6a21965ff3
chore: add prettier for js formatting (#937)
* chore: add prettier for js/ts formatting

* fix lint-staged to object

* test commit

* format all

* lock file bump

* eslint extends prettier

This will let us skip rules in eslint that prettier can control. Prettier for styles, eslint for code errors.

* add prettier config

* roll back to what we had with eslint settings

* skip mutation observer

* add prettier typescript eslint

* run prettier in lint workflow

* format:check script

* turn off space before function in eslint

it is fighting with prettier

* fix dir in workflow

* remove semis

* add api to eslint

* shift eslint ignore comment after prettier format

* ignore errors that currently exist

* build:typevalidators

* replace was broken on typevalidator build

* try pushing up error

* format

* try removing working dir from eslint workflow

* try node 12

* fix indent in action

* bump eslint

* fix supposeded error and try another

* try breaking eslint

* try building in action

* adjust action paths again

* need dot

* remove build

* fix(tauri.js/eslint): escape glob *

* fix(tauri.js): ignore lint error

* Create prettier-taurijs.md

Co-authored-by: Noah Klayman <noahklayman@gmail.com>
2020-08-18 21:36:46 -05:00
renovate[bot]
a949e711e4
chore(deps) Update Rust crate serde_json to 1.0.57 (#905)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-08-18 16:57:54 -05:00
chip
20a6d73cee
mark helper scripts as executable (#935) 2020-08-18 16:30:44 -05:00
Toinane
06f5183646
documentation: fix typo (#940) 2020-08-18 08:29:12 -05:00
Zak Patterson
43a8c4d2bc
fix #920: Create recipes (#930)
* Create recipes

A recipe consists of:
	* Name
	* List of NPM dependencies required (dev and production)
	* Sub-commands needed
		For example, the react recipes run create-react-app to set
		up the UI. Future recipes can do anything, they could pull
		down a sample UI, clone a repository, download a static HTML
		file, initialize another environment that compiles to JS/wasm etc.

The devPath and dist folders nomally configured by the init command
are overridden by the recipe definition.

* Fix no recipe prompts

* Fix linter unsafe assignment error

* Add `beforeXCommand` settings to recipes

This is so good, it makes it possible to just run:

> yarn init
> yarn add tauri
> yarn tauri init # with recipe selected, adds app ui
> yarn tauri dev # starts app ui dev server and rust component

* Rename init to create

Also improve so it exports a function that can be passed
arguments, instead of just reading directly from command line

* Add new tauri init command aliased to create

* Update changes file

* Remove unneeded import

* Add customized splash page for react recipes

* Remove unneeded recipe buildconfig property

* Add no-browser setting to start react dev server

* Revert "Add no-browser setting to start react dev server"

This reverts commit 22bcf3ac5a.
2020-08-17 12:07:44 -05:00
Oleg Shilov
f98d4b9076
fix(tauri.js): fix return type for readBinaryFile api method (#927)
* fix(tauri.js): fix return type for `readBinaryFile` api method

* chore(tauri.js): add changelog
2020-08-07 19:56:29 -05:00
Oleg Shilov
0a5bac1dd6
fix(tauri.js): fix typings for open and save dialogs (#926)
* fix(tauri.js): fix typings for open and save dialogs

add JSDoc types;

* chore(tauri.js): add changelog
2020-08-07 19:54:17 -05:00
github-actions[bot]
2b3ef7bcfb
Apply Version Updates From Current Changes (#915)
Co-authored-by: jbolda <me@jacobbolda.com>
2020-08-03 22:45:11 -03:00
Zak Patterson
e1fd626453
Fix typos referring to CLI args in init command (#921)
* Fix typo referring to dev path cli arg

The devPath config variable is set to a non-existent command line arg
`argv.p`, it should be `argv.P`

So if the devPath is set via a command line argument, it defaults
to the default value:

```
/home/projects/example2
⟩ yarn tauri init -P http://THISDOESNOTHING
yarn run v1.22.4
$ /home/projects/example2/node_modules/.bin/tauri init -P http://THISDOESNOTHING
[tauri]: running init
? What is your app name? example2
? What should the window title be? Tauri App
? Where are your web assets (HTML/CSS/JS) located, relative to the "<current dir>/src-tauri" folder that will be created? ../dist
 dependency:manager Installing missing dependencies... +0ms
 dependency:cargo-commands "tauri-bundler" is already installed +18ms
 app:spawn [sync] Running "cargo generate-lockfile" +2ms

    Updating crates.io index
 dependency:crates "tauri" is already installed +941ms
 dependency:npm-packages "tauri" is already installed +1s
Done in 6.35s.

/home/projects/example2
⟩ cat ./src-tauri/tauri.conf.json | grep THISDOESNOTHING

/home/projects/example2
```

* Fix similar typo affecting the window title param

* Add change file
2020-08-03 20:38:15 -05:00
Lance Erickson
df70ca5196
Fix #912 multibyte character breaks message (#914)
* Fix #912 multibyte character breaks message

* Add change file

* Fix clippy
2020-08-01 18:34:50 -05:00
Laegel
cc67680fca
fix: Updated target docs path (#908) 2020-07-29 23:53:30 +02:00
Noah Klayman
da6580ff7d
feat(tauri.js/init): set appName in api instead of bin (#897) 2020-07-28 10:05:49 -03:00
Jacob Bolda
e274ecb77b
fix: this allows proper running of the docs update button (#901)
* fix: this allows proper running of the docs update button

* single quotes
2020-07-27 20:48:28 -05:00
github-actions[bot]
22b085ecfd
Apply Version Updates From Current Changes (#877)
Co-authored-by: lucasfernog <lucas@tauri.studio>
2020-07-26 15:13:04 -03:00
Noah Klayman
78add1e79e
feat(bundler): hide output from shell scripts unless --verbose is passed (fixes #888) (#893)
* feat(bundler): hide output from bundle_appimage.sh

* fix(bundler/appimage): log file name instead of full path
to match behavior of .deb build

* feat(bundler): hide shell script output unless --verbose is passed

* feat(bundler): add notice about --verbose on error

* fix(bundler): windows fails to compile

* fix(bundler) do not warn about verbosity if verbose is set

* chore(changes) add change file

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2020-07-26 13:56:10 -03:00
Lucas Fernandes Nogueira
63b9c64572
fix(bundler) properly detect the target directory (#895) 2020-07-25 17:04:45 -03:00
chip
b96b1fb6b8
inject css with template string to allow for line breaks (#894)
* inject css with template string to allow for line breaks

alternative solution would to be implement a struct `JsStringLiteral`
with `fmt::Display` that escapes all forbidden codepoints from the spec
https://www.ecma-international.org/ecma-262/#sec-literals-string-literals

template string literal seems fine as all browsers that tauri supports have
had support for them for the past 3-4+ years

Signed-off-by: Chip Reed <chip@chip.sh>

* chore(changes) adjust change file

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2020-07-25 15:52:52 -03:00
chip
6ee720eae1
feat(workflow) update helper cargo-check scripts (#892)
They can now run check, clippy, fmt, or test. They default to running
clippy, fmt, and test in that order. The cargo sub-commands to run
can be specified as arguments to the script. Only the 4 supported
sub-commands are allowed.

Signed-off-by: Chip Reed <chip@chip.sh>
2020-07-24 11:19:02 -03:00
Lucas Fernandes Nogueira
a00ac023ee
fix(bundler) webview dll not being bundled, fixes #875 (#889) 2020-07-24 08:51:12 -03:00
chip
bbccad4e03
fix clippy warnings (#891)
Signed-off-by: Chip Reed <chip@chip.sh>
2020-07-24 08:19:10 -03:00
chip
a3362f3ade
disable tests that fail on default windows installs (#890)
cat is not available as a command on a default windows install.
This disables the command test that uses cat during tests.  It also
disables `test_cmd_fail` even though it passes, because the test
is testing the wrong thing in this case.
2020-07-24 08:09:56 -03:00
Lucas Fernandes Nogueira
4abd12c2a4
fix(tauri) webview initialization on windows, fixes #879 (#885) 2020-07-23 08:38:40 -03:00
Jacob Bolda
44b1be56e4
fix: check for version mode, wrongly skipped PR (#887) 2020-07-22 21:00:28 -05:00
chip
e3e2e39208
fix(tauri) ensure css content is loaded inside a string (#884)
Signed-off-by: Chip Reed <chip@chip.sh>
2020-07-22 18:45:59 -03:00
renovate[bot]
91f1c88009
chore(deps) Update Tauri JS CLI (#882)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-22 09:08:33 -03:00
renovate[bot]
4fb16d103f
chore(deps) Update dependency @types/inquirer to v7 (#883)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-22 09:08:07 -03:00
renovate[bot]
3216f48a81
chore(deps) Update Tauri Core (#881)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-22 09:07:50 -03:00
renovate[bot]
d81c2b9066
chore(deps) Update Rust crate handlebars to 3.3 (#880)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-22 09:07:32 -03:00
Jacob Bolda
daa89213de
chore: publish sequence finishing touches (#873) 2020-07-21 14:35:43 -03:00
chip
8cba944c11
Helper scripts to run cargo clippy + test for all features (#874) 2020-07-21 14:35:22 -03:00
Lucas Fernandes Nogueira
ad717c6f33
chore(tauri) pin tauri-api dep version (#872) 2020-07-21 14:34:31 -03:00
Lucas Fernandes Nogueira
61fbf6837d
fix(workflow) add secret tokens to the covector run (#871) 2020-07-20 17:21:43 -03:00
github-actions[bot]
19af83c7e9
Apply Version Updates From Current Changes (#821)
Co-authored-by: lucasfernog <lucas@tauri.studio>
2020-07-20 16:39:42 -03:00
Lucas Fernandes Nogueira
b6ba44d81d
chore(tauri) use published webview binding v0.0.1 (#870) 2020-07-20 15:44:57 -03:00
Jacob Bolda
c0c27202c2
chore: tangle if doesn't need expression brackets (#869) 2020-07-20 00:48:45 -05:00
Jacob Bolda
f0559fad41
chore: properly skip tangle (#868)
Outputs are now one level up as we define them in the previous job.
2020-07-20 00:40:08 -05:00
Jacob Bolda
29624b004a
chore: remove publish workflow context dumps (#867) 2020-07-20 00:35:13 -05:00
Jacob Bolda
2684a835b5
chore: explicitly define publish output for tangle (#866)
* dump context on PR

* explicitly define outputs

* output change

* add job in needs

* housed under outputs?

* try explicit output definition
2020-07-20 00:19:35 -05:00
Jacob Bolda
d09180fd89
chore: covector tweaks for smoothness (#865)
* reorder packages that core is published last

* general ledger comment, not just npm

* we do want to create releases

* leading ! does not seem to negate

* dump a bunch of info to debug
2020-07-19 23:34:16 -05:00
Lucas Nogueira
dac0ae976e
chore(changes) add tauri-api to JS dialogs changefile 2020-07-19 23:50:59 -03:00
Lucas Nogueira
16f1338fe5
chore(tauri.js) use --agressive on cargo update 2020-07-19 23:47:14 -03:00
Jacob Bolda
0e8cd1db34
fix: publish workflow name and parse error (#864) 2020-07-19 15:50:56 -05:00
Lucas Fernandes Nogueira
f8081c0e34
feat(tauri) add init_script plugin feature (#863) 2020-07-19 17:38:51 -03:00
Jacob Bolda
2d721324a0
chore: implement covector publish (#845)
* add covector to root

* add workflow to covector config

* bump covector

* add webkit install on publish

* create workflow to version and publish

* remove workflows no longer needed

* add repo info to root package.json

* add early exits based on new output

* switch to dry run version of publish commands

* latest branch is being removed in this PR

* add summary component around yarn audit
2020-07-19 15:33:12 -05:00
Lucas Fernandes Nogueira
0f00384152
perf(tauri.js) build API typedefs on the API compilation process (#861) 2020-07-19 16:51:00 -03:00
Rajiv Shah
e52afd94d0
chore(tauri.js): Update yarn.lock (#860) 2020-07-19 15:24:48 -03:00
Jacob Bolda
71e277d127
chore: add audit button and yarn audit (#859)
* chore: add audit button and yarn audit

This is a new feature that should give us a button that we can click a button to see audit results rather than waiting for a cron or a run within our workflows.

* split audit into js and rust
2020-07-19 12:59:45 -05:00
Lucas Fernandes Nogueira
a6bb3b5905
refactor(tauri) rename whitelist to allowlist, ref #645 (#858)
* refactor(tauri) rename `whitelist` to `allowlist`, ref #645

* chore(changes) add changefile
2020-07-19 10:05:23 -03:00
Lucas Fernandes Nogueira
cbd14c3077
fix(tauri.js) writeFile and writeBinaryFile API (#857) 2020-07-19 09:57:40 -03:00