diff --git a/CHANGELOG.md b/CHANGELOG.md index ae4f8f6e..6bd5b746 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how * Generate log files in user directory (974a17e3b573520a775f813c72ecbd30a32012bf) * Make sure there is no eval error in the root layer (fbd8eb4b91dfbb614b2b59a1a2a7fea9f594313d) * Recognize `bsdtar` for windows (#64) +* Add `-q`/`--quick` option for quickstart (#67) ## 0.7.x > Released Sep 08, 2022 diff --git a/docs/content/en/Getting Started/Basic Usage.md b/docs/content/en/Getting Started/Basic Usage.md index 7bd1934c..573ab478 100644 --- a/docs/content/en/Getting Started/Basic Usage.md +++ b/docs/content/en/Getting Started/Basic Usage.md @@ -28,22 +28,22 @@ Usage: eask [options..] Commands: activate [files..] activate package; use to test package activation - archives list out all package archives [aliases: sources] + archives list out all package archives [aliases: sources] autoloads generate autoloads file clean-all do all cleaning tasks clean-elc remove byte compiled files generated by cask build clean clean up local .eask directory - compile [names..] byte compile all Emacs Lisp files in the package [aliases: build] - concat [names..] concatenate all elisp files [aliases: concatenate] - create create a new elisp project [aliases: new] + compile [names..] byte compile all Emacs Lisp files in the package [aliases: build] + concat [names..] concatenate all elisp files [aliases: concatenate] + create create a new elisp project [aliases: new] emacs [args..] execute emacs with the appropriate environment eval [form] evaluate lisp form with a proper PATH - path print the PATH (exec-path) from workspace [aliases: exec-path] + path print the PATH (exec-path) from workspace [aliases: exec-path] exec [args..] execute command with correct environment PATH set up files print the list of all package files info display information about the current package init create new Eask file in current directory - install-deps automatically install package dependencies [aliases: install-dependencies, prepare] + install-deps automatically install package dependencies [aliases: install-dependencies, prepare] install [names..] install packages keywords list available keywords that can be used in the header section lint run linter @@ -60,32 +60,33 @@ Commands: reinstall [names..] reinstall packages search [queries..] search packages test run test - uninstall [names..] uninstall packages [aliases: delete] + uninstall [names..] uninstall packages [aliases: delete] upgrade [names..] upgrade packages check-eask [files..] run eask checker locate print out Eask installed location - upgrade-eask upgrade Eask itself [aliases: upgrade-self] + upgrade-eask upgrade Eask itself [aliases: upgrade-self] Options: - --version Show version number [boolean] - --help Show usage instructions [boolean] - -g, --global change default workspace to ~/.emacs.d/ [boolean] - -f, --force enable force flag [boolean] - --development, --dev turn on development mode [boolean] - --debug turn on debug mode [boolean] - --strict report error instead of warnings [boolean] - --allow-error continue the executioon even there is error reported [boolean] - --insecure allow insecure connection [boolean] - --timestamps log with timestamps [boolean] - --log-level log with level [boolean] - --log-file, --lf generate log files [boolean] - --elapsed-time, --et show elapsed time between each operation [boolean] - --no-color disable color output [boolean] - --proxy update proxy for HTTP and HTTPS to host [string] - --http-proxy update proxy for HTTP to host [string] - --https-proxy update proxy for HTTPS to host [string] - --no-proxy set no-proxy to host [string] - -v, --verbose set verbosity from 0 to 4 [number] + --version Show version number [boolean] + --help Show usage instructions [boolean] + -g, --global change default workspace to ~/.emacs.d/ [boolean] + -q, --quick start eask cleanly without loading the init.el [boolean] + -f, --force enable force flag [boolean] + --development, --dev turn on development mode [boolean] + --debug turn on debug mode [boolean] + --strict report error instead of warnings [boolean] + --allow-error continue the executioon even there is error reported [boolean] + --insecure allow insecure connection [boolean] + --timestamps log with timestamps [boolean] + --log-level log with level [boolean] + --log-file, --lf generate log files [boolean] + --elapsed-time, --et show elapsed time between each operation [boolean] + --no-color disable color output [boolean] + --proxy update proxy for HTTP and HTTPS to host [string] + --http-proxy update proxy for HTTP to host [string] + --https-proxy update proxy for HTTPS to host [string] + --no-proxy set no-proxy to host [string] + -v, --verbose set verbosity from 0 to 4 [number] For more information, find the manual at https://emacs-eask.github.io/ ``` diff --git a/docs/content/en/Getting Started/Commands and options.md b/docs/content/en/Getting Started/Commands and options.md index 369fb023..544f848f 100644 --- a/docs/content/en/Getting Started/Commands and options.md +++ b/docs/content/en/Getting Started/Commands and options.md @@ -491,14 +491,12 @@ Install package `auto-complete` for your Emacs configuration: $ eask -g [COMMAND] ``` -## 🔍 --development, --dev - -Notify command with development scope enabled. +## 🔍 --quick, -q -If we attempt to install development dependencies: +Start cleanly without loading the configuration files. ```sh -$ eask --dev [COMMAND] +$ eask -q [COMMAND] ``` ## 🔍 --force, -f @@ -511,6 +509,16 @@ Force to uninstall the package `dash` even it's a dependency from another packag $ eask -f [COMMAND] ``` +## 🔍 --development, --dev + +Notify command with development scope enabled. + +If we attempt to install development dependencies: + +```sh +$ eask --dev [COMMAND] +``` + ## 🔍 --debug Enable debug information. diff --git a/eask b/eask index 131ac95c..1fe981ae 100755 --- a/eask +++ b/eask @@ -28,76 +28,81 @@ yargs 'Show usage instructions' ) .option('global', { - description: 'change default workspace to ~/.emacs.d/', + description: `change default workspace to ~/.emacs.d/`, alias: 'g', type: 'boolean', }) +.option('quick', { + description: `start cleanly without loading the configuration files`, + alias: 'q', + type: 'boolean', + }) .option('force', { - description: 'enable force flag', + description: `enable force flag`, alias: 'f', type: 'boolean', }) .option('development', { - description: 'turn on development mode', + description: `turn on development mode`, alias: 'dev', type: 'boolean', }) .option('debug', { - description: 'turn on debug mode', + description: `turn on debug mode`, type: 'boolean', }) .option('strict', { - description: 'report error instead of warnings', + description: `report error instead of warnings`, type: 'boolean', }) .option('allow-error', { - description: 'continue the executioon even there is error reported', + description: `continue the executioon even there is error reported`, type: 'boolean', }) .option('insecure', { - description: 'allow insecure connection', + description: `allow insecure connection`, type: 'boolean', }) .option('timestamps', { - description: 'log with timestamps', + description: `log with timestamps`, type: 'boolean', }) .option('log-level', { - description: 'log with level', + description: `log with level`, type: 'boolean', }) .option('log-file', { - description: 'generate log files', + description: `generate log files`, alias: 'lf', type: 'boolean', }) .option('elapsed-time', { - description: 'show elapsed time between each operation', + description: `show elapsed time between each operation`, alias: 'et', type: 'boolean', }) .option('no-color', { - description: 'disable color output', + description: `disable color output`, type: 'boolean', }) .option('proxy', { - description: 'update proxy for HTTP and HTTPS to host', + description: `update proxy for HTTP and HTTPS to host`, type: 'string', }) .option('http-proxy', { - description: 'update proxy for HTTP to host', + description: `update proxy for HTTP to host`, type: 'string', }) .option('https-proxy', { - description: 'update proxy for HTTPS to host', + description: `update proxy for HTTPS to host`, type: 'string', }) .option('no-proxy', { - description: 'set no-proxy to host', + description: `set no-proxy to host`, type: 'string', }) .option('verbose', { - description: 'set verbosity from 0 to 4', + description: `set verbosity from 0 to 4`, alias: 'v', requiresArg: true, type: 'number', diff --git a/lisp/_prepare.el b/lisp/_prepare.el index 7e829da6..37a98fa9 100644 --- a/lisp/_prepare.el +++ b/lisp/_prepare.el @@ -412,6 +412,7 @@ the `eask-start' execution.") ;;; Boolean (defun eask-global-p () (eask--flag "-g")) ; -g, --global +(defun eask-quick-p () (eask--flag "-q")) ; -q, --quick (defun eask-force-p () (eask--flag "-f")) ; -f, --force (defun eask-dev-p () (eask--flag "--dev")) ; --dev, --development (defun eask-debug-p () (eask--flag "--debug")) ; --debug @@ -478,7 +479,7 @@ other scripts internally. See function `eask-call'.") (defconst eask--option-switches (eask--form-options - '("-g" "-f" "--dev" + '("-g" "-q" "-f" "--dev" "--debug" "--strict" "--allow-error" "--insecure" @@ -637,10 +638,11 @@ Eask file in the workspace." (eask-with-progress (ansi-green "Loading your configuration... ") (eask-with-verbosity 'debug - (load (locate-user-emacs-file "early-init.el") t) - (load (locate-user-emacs-file "../.emacs") t) - (load (locate-user-emacs-file "init.el") t)) - (ansi-green "done")) + (unless (eask-quick-p) + (load (locate-user-emacs-file "early-init.el") t) + (load (locate-user-emacs-file "../.emacs") t) + (load (locate-user-emacs-file "init.el") t))) + (ansi-green (if (eask-quick-p) "skipped ✗" "done ✓"))) (eask--with-hooks ,@body)) (t (let* ((user-emacs-directory (expand-file-name (concat ".eask/" emacs-version "/"))) diff --git a/src/util.js b/src/util.js index fa1bebd8..d316f3ea 100644 --- a/src/util.js +++ b/src/util.js @@ -76,6 +76,7 @@ function _global_options(argv) { let flags = []; /* Boolean type */ flags.push(def_flag(argv.global, '-g')); + flags.push(def_flag(argv.quick, '-q')); flags.push(def_flag(argv.force, '-f')); flags.push(def_flag(argv.development, '--dev')); flags.push(def_flag(argv.debug, '--debug')); diff --git a/test/options/run.sh b/test/options/run.sh index 65eaa06a..dc7c767b 100644 --- a/test/options/run.sh +++ b/test/options/run.sh @@ -28,9 +28,11 @@ echo "Test all options flag" cd $(dirname "$0") # Please have these flags in order, see `eask` file in the project root! -eask info --g +eask info -g eask info --global -eask info --f +eask info -q +eask info --qucik +eask info -f eask info --force eask info --dev eask info --development @@ -47,4 +49,5 @@ eask info --proxy localhost:8080 eask info --http-proxy localhost:8080 eask info --https-proxy localhost:8080 eask info --no-proxy localhost:8080 +eask info -v 4 eask info --verbose 4