Commit graph

168 commits

Author SHA1 Message Date
silverwind
3621944c2d modernize js and use babel (#8973)
* modernize js and use babel

- add babel toolchain to transform modern JS to ES5
- extend eslint config for modern rules
- fixes linting issues via `eslint --fix` and manual fixes

* run 'make css' to satisfy CI

* code style tweaks and set js indendation to 2 in .editorconfig

* regenerate js
2019-11-14 21:39:51 +00:00
Lunny Xiao
afe50873a5 Move index.js to web_src and use webpack to pack them (#8598)
* Move index.js to web_src and use webpack

* Fix initHeatMap

* update eslint and move webpack to devDependencies

* update index.js

* add eslint env node
2019-11-13 15:52:13 +01:00
silverwind
577b1cb29b Update JS dependencies (#8051) 2019-09-02 17:02:53 -04:00
dependabot[bot]
ab0f378d7b Bump eslint-utils from 1.3.1 to 1.4.2 (#7993)
Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.3.1 to 1.4.2.
- [Release notes](https://github.com/mysticatea/eslint-utils/releases)
- [Commits](https://github.com/mysticatea/eslint-utils/compare/v1.3.1...v1.4.2)

Signed-off-by: dependabot[bot] <support@github.com>
2019-08-27 00:29:25 -04:00
silverwind
4091e0dfee update js dependencies (#7462)
this is the result of `make npm-update js css`
2019-07-14 12:53:04 -04:00
dependabot[bot]
3fc47de332 Bump lodash from 4.17.11 to 4.17.14 (#7459)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.14.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.14)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-14 12:04:36 +08:00
silverwind
68ec7b8be9 update dependencies and various tweaks (#7344)
- ran `make npm-update`
- ran `make js`, fixed new lint issue
- ran `make css`, this added back some vendor prefixes
- added `engines` property to package.json to specify minimum required
  Node.js version
- added `private` property to package.json to prevent accidential
  publishing to npm
2019-07-02 20:11:24 +01:00
silverwind
c37ec66ee2 replace lesshint with stylelint (#7305)
New CSS linter which is much more powerfull than the previous one.
Configuration is default but I had to remove a few rules that were
throwing too many or weird errors.

More importantly, the linter will exit with code 1 on errors so now our
build will fail if the CSS linter fails which should eliminate linter
errors being introduced without notice.
2019-06-27 08:36:36 +02:00
silverwind
a71cabbd53 add 'npm' and 'npm-update' make targets and lockfile (#7246)
* add 'npm' and 'npm-update' make targets and lockfile

- `make npm` installs and updates node_modules, triggered automatically
   on `make css` and `make js` as it completes reasonably fast and
   ensures consistent modules.
- `make npm-update` updates all dependencies to their latest version,
   regenerates `node_modules` from scratch and updates
   `package-lock.json`. It uses npm modules `updates` written by yours
   truly to find the latest version of each dependency.

* add suggested make dependencies

* remove package-lock.json during npm-update

* regenerate package-lock.json
2019-06-18 22:59:47 -04:00
silverwind
04f996f1f9 remove and disable package-lock (#6969)
* remove and disable package-lock

Using exact versions in package.json has the same effect as lockfiles
without all the troubles the lockfiles bring (different versions of
package manager generating different lockfiles primarily).

Ensured we only use exact versions in package.json and stopped
generation of new lockfiles via .npmrc which is support by both the npm
and yarn package managers.

Fixes: https://github.com/go-gitea/gitea/issues/6967

* enable save-exact
2019-05-16 15:33:54 -04:00
silverwind
d9dcd09340 add make targets for js and css, add js linter (#6952)
* add make targets for js,css, add javascript linter

- add `make js`, deprecating `make javascripts`
- add `make css`, deprecating `make generate-stylesheets` and
  `make stylesheets-check`
- changed the unclean css check to only run on CI
- add JS linting via eslint with basic configuration and fixed
  discovered issues
- changed autoprefixer to use official `postcss-cli` avoiding the need
  to loop in the makefile
- moved browserslist to package.json so other future tools can use it
  too.
- update documentation for new make targets and added JS section

* fix indentation

* move functions used in html to 'exported' list

* Run lessc binary without having to install anything to node_modules

* use relative paths to node bin scripts, removing npx

* Revert "use relative paths to node bin scripts, removing npx"

This reverts commit 119b725525.

* fix lessc and postcss plugins

* check for node_modules and use actual bin names
2019-05-16 08:57:47 +03:00
Xaver Maierhofer
3957b40021 Add less linter via npx (#6936) 2019-05-14 08:54:23 +08:00
silverwind
353282e658 Add autoprefixer to css build (#6029)
* Add autoprefixer to css build

* also use autoprefixer on theme files
2019-02-11 01:13:30 -05:00
zeripath
11a9ce6a2b Increase the version of less (#6010) 2019-02-09 11:00:07 +08:00
silverwind
c55caeaf0c Update npm dependencies, regenerate CSS (#4415) 2018-07-11 10:54:28 -04:00
techknowlogick
f1d6a1fffc
Add the ability to have built in themes in Gitea (#4198)
This makes it easier for user who want to theme but
don't have the ability to know how to customize templates
all that is required is a change in a config option

The reason why I chose the DEFAULT_THEME as variable,
as perhaps in the future we will allow users to chose their
theme whon logged in just like we do with languages
2018-07-05 17:25:04 -04:00
Lauris BH
abff697f31 Update less.js to latest version (#3932) 2018-05-10 13:36:47 +08:00
David Schneiderbauer
9ae445c28f lock npm packages (#3912) 2018-05-07 21:46:04 +03:00