19 Commits

Author SHA1 Message Date
dfcbe6c319 style: formatting and whitespaces (#7840) 2019-09-19 15:40:31 +03:00
fed360d763 refactor: add __snapshot in d.ts and fix checks 2019-08-02 11:35:07 +03:00
8756b3da16 refactor: HMR and webpack improvements (#7462)
* chore: update project

* refactor: clear module-name cache on orientation

* feat: add custom component in qualifiers app

* feat: enable HMR for custom components

* refactor: remove redundant check

* chore: clean console.log
2019-07-08 11:11:14 +03:00
9fcc1ddf94 feat(bundle): support for file qualifiers + builder refactor (#7386)
* feat(bundle): support for file qualifiers in builder

* chore: add qualifiers test app

* chore: add @Deprecated for file-name-resolver

* fix(hmr): hmr not working for scss files

* chore: globals clean-up

* shore: fix tslint

* tests: uncomment test fixed by ns-dev-webpack

* chore: move qualifiers app to e2e

* chore: update webpack config

* chore: tslint errors

* test: fix wrong css import
2019-06-26 18:40:18 +03:00
ecd9fc3e9d feat: bundle workflow support (#7337) 2019-06-20 15:58:36 +03:00
8a2f592df9 refactor(HMR): Refactor livesync propagaton 2019-05-03 17:48:44 +03:00
5449cfa238 fix(docs): Move NativeScriptError declaration to a separate file (#6927)
It is used by `application.d.ts` and needs to be documented. The reason
that it wasn't included in the documentation by now is that `tns-core-modules.d.ts`
(which imports `module.d.ts`) defines types which are part of the internal
modules and runtimes APIs. As such they are excluded from the generation
of API documentation.
2019-02-20 13:58:09 +02:00
44b8acd79c feat(HMR): apply changes in page styles at runtime when app root is a frame (#6857)
* feat(HMR): apply changes in page styles at runtime

* fix: livesync tests

* test: changeCssFile method

* refactor: address comments

Add a comment.
Update `let` to `const`.
Update `changesCssFile` test.

* test: add an assert
2019-02-14 14:03:13 +02:00
ff476d983d refactor: rename HmrContext to ModuleContext (#6843)
* refactor: rename HmrContext to ModuleContext

* refactor(ModuleContext): rename module to path
2019-01-31 18:32:25 +02:00
28db2afbd4 feat: OnDiscardedError typings and event (#6777)
* feat: OnDiscardedError typings and event

* remove ios and android from DiscardedErrorEventData
2019-01-09 18:24:25 +02:00
790bcfb470 refactor(HMR): apply changes in application styles at runtime 2018-12-14 14:34:50 +02:00
42a1491e6e feat(HMR): apply changes in application styles at runtime
Expose `HmrContext` interface.
Apply changes in `app.css` instantly.
Avoid navigation on livesync when changes in `app.css` have been made.
Apply changes in `app.css` on back navigation.
2018-12-14 14:34:47 +02:00
255fedac83 Add a globals.registerWebpackModules that can register dynamic require webpack context (#5087) 2017-11-22 13:02:42 +02:00
43fbabb5e9 Fixed most module cyclic references. There is one left for ios and android: (#4978)
- http -> http-request -> image-source
that can't be fixed easily and will be removed once we delete image-source module because it is obsolete anyway.
There is one more for android:
- frame -> fragment that could be removed if we use global object.
Updated madge bersion
2017-11-10 15:47:02 +02:00
f7a3a36b9c Housekeeping node tests, renamed to unit-tests (#4936)
Add parsers for the background css shorthand property, make ViewBase unit testable in node environment

Add background parser and linear-gradient parser

Use sticky regexes

Simplify some types, introduce generic Parsed<T> instead of & TokenRange

Apply each parser to return a { start, end, value } object

Move the css selector parser to the css/parser and unify types

Add the first steps toward building homegrown css parser

Add somewhat standards compliant tokenizer, add baseline, rework and shady css parsers

Enable all tests again, skip flaky perf test

Improve css parser tokenizer by converting some char token types to simple string

Implement 'parse a stylesheet'

Add gonzales css-parser

Add parseLib and css-tree perf

Add a thin parser layer that will convert CSS3 tokens to values, for now output is compatible with rework

Make root tsc green

Return the requires of tns-core-modules to use relative paths for webpack to work

Implement support for '@import 'url-string';

Fix function parser, function-token is no-longer neglected

Make the style-scope be able to load from "css" and "css-ast" modules

Add a loadAppCss event so theme can be added to snapshot separately from loaded
2017-10-20 10:42:07 +03:00
290a771ea1 add calls to the network agent (Chrome DevTools) inside http-request.android when making http requests if debugging is enabled 2017-03-17 09:44:25 +02:00
20c846e966 Fix webpack project compilation for TypeScript 2.1.
Add __requireOverride as an optional `global` member.
2017-02-16 16:58:59 +02:00
86481cce4a Make typings compatible with @types/node.
Fixes name clashes and uses Node-compatible typings where possible.

Changes:
 - setTimout et al now return NodeJS.Timer instead of number
 - No "console" module anymore. Everyone uses it through global.console
 anyway.
 - We have a typed "global" instance with exposed properties now. Any
 "freeform" accesses must go through a `(<any>global).blah` cast.
 - remove tns-core-modules.{base,es6,es2015}.d.ts. Those were needed
 as workarounds for the ES6/DOM/Node type clashes.
2017-02-15 13:01:10 +02:00
e135c20b14 Rename the files 2016-05-26 14:30:25 +03:00