创建平台

1
ionic cordova platform add android 

创建签名文件

1
keytool -genkey -v -keystore he-release.keystore -alias he -keyalg RSA -keysize 2048 -validity 10000

创建签名配置文件

阅读全文 »

官方原文

浏览器环境下使用本地化插件

ionic native拥有130多个移动SDK插件,这点使得可能构建强大的ionic app。

由于历史原因,在浏览器环境下测试这些本地插件是很困难的,要求ionic开发者比如在物理设备或者虚拟机中进行测试,这是相当慢的一个过程。

ionic native3.0现在允许开发者能够伪装,在浏览器环境下通过重写类,是的能够提供测试数据,或者访问本地化API,比如HealthKit。

阅读全文 »

英文原版
大家好,很高兴的宣布,ionic cli v3版现在可以使用啦!
自从我们发布CLI v3 Beta版和我们的彩蛋,我们已经见证了众多的早期Beta测试者在他们的ionic项目中成功的使用。这些测试者提供了大量的反馈,当然也有机会中奖。事实上,他们中的许多人几个小时内就找到了其中的彩蛋。尤其最近,当开发者在我们上周举办的编程马拉松中成为了Ionic Jedi Hacksters,我们获得了更多的回馈
(编程马拉松战绩在这里)除了版本改变外,什么使得这个CLI这么特别呢,让我们看下这版CLI的几个关键点吧。

除了版本变化,这版的CLI特殊在哪呢,我们看下以下几个关键点吧:

速度+指南

你可能会留意到这版CLI的安装是如此之快,部分原因是在消除了超过90MB的依赖和成千上万行的旧程序code!如今,当你安装CLI的时候,你会得到更小的空间占用,安装时间也会更短。所以,CLI的速度和表现是我们主要考虑点之一。

另一个考虑点是我们要提供更多的帮助、指南和反馈。大量的命令现在提供所需的交互信息,CLI试图在问题出来时,能够是有用的,有效的。命令帮助已经提升。
仅仅加上--help参数到任意的命令上,就可以得到详细的输入信息和参数信息。我们也提供普通使用的样例信息,比如试下下面的这句命令ionic start --help

阅读全文 »

使用文字界面来设定,对于了解Linux有一定的帮住,平时不免接触,常用命令总结如下。

系统

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
uname -a # 查看内核,操作系统,CPU信息 
head -n 1 /etc/issue # 查看操作系统版本
env # 查看环境变量

# centos版本查看
cat /etc/redhat-release

# cpu
cat /proc/cpuinfo

# 内存
cat /proc/meminfo

# 修改时区
timedatectl set-timezone Asia/Shanghai

进程状态

阅读全文 »

在利用webpack2作为构建工具打包Angular4时,出现一个问题就是有两个文件打包出来的哈希值不变。

文件如下:

1
2
'common': './node_modules/moment/moment.js',
'polyfills': `./client/${platform}/polyfills.browser.ts`,

这两个文件,一个是服务于moment这个时间类库,一个是服务于处理SPA应用的浏览器兼容性问题,这两个文件,在webpack配置文件中我的配置方式如下

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/**
* Options affecting the output of the compilation.
*
* See: http://webpack.github.io/docs/configuration.html#output
*/
output: {

/**
* The output directory as absolute path (required).
*
* See: http://webpack.github.io/docs/configuration.html#output-path
*/
path: helpers.root('dist'),

/**
* Specifies the name of each output file on disk.
* IMPORTANT: You must not specify an absolute path here!
*
* See: http://webpack.github.io/docs/configuration.html#output-filename
*/
filename: '[name].[chunkhash].bundle.js',

/**
* The filename of the SourceMaps for the JavaScript files.
* They are inside the output.path directory.
*
* See: http://webpack.github.io/docs/configuration.html#output-sourcemapfilename
*/
sourceMapFilename: '[name].[chunkhash].bundle.map',

/**
* The filename of non-entry chunks as relative path
* inside the output.path directory.
*
* See: http://webpack.github.io/docs/configuration.html#output-chunkfilename
*/
chunkFilename: '[id].[chunkhash].chunk.js'

},

阅读全文 »
0%