Skip to content

Commit

Permalink
NXP-30647: fix symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
andreacornaglia committed Oct 7, 2021
1 parent b2970b0 commit ce384db
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 4 additions & 1 deletion nuxeo-coldstorage-web/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { importHTML } from '@nuxeo/nuxeo-ui-elements/import-href.js';
import './elements/nuxeo-move-content-to-coldstorage-button.js';
import './elements/nuxeo-move-contents-to-coldstorage-button.js';
import './elements/nuxeo-retrieve-content-from-coldstorage-button.js';
import './elements/icons/coldstorage-icons.js';
import './elements/nuxeo-coldstorage-infobar.js';
import './elements/nuxeo-restore-content-from-coldstorage-button.js';

import './nuxeo-coldstorage.html';
import html from './nuxeo-coldstorage.html';

importHTML(html);
9 changes: 5 additions & 4 deletions nuxeo-coldstorage-web/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ const GLOBALS = {
// Ignore these imports since they should just be all about custom element definitions which are done already by Web UI
const IGNORES = [/^@(nuxeo|polymer)\//];

// Keep these imports
const KEEP = ['@nuxeo/nuxeo-ui-elements/import-href.js'];

const TARGET = 'target/classes/web/nuxeo.war/ui';

export default {
Expand All @@ -42,9 +45,7 @@ export default {
transform(code, id) {
// HTML imports
if (path.extname(id) === '.html') {
return `const tmpl = document.createElement('template');tmpl.innerHTML = ${JSON.stringify(
code,
)};document.head.appendChild(tmpl.content);`;
return `export default ${JSON.stringify(code)}`;
}

const dep = path.relative('./node_modules', id);
Expand All @@ -55,7 +56,7 @@ export default {
}

// Ignore bundled imports
if (IGNORES.some((r) => r.test(dep))) {
if (!KEEP.includes(dep) && IGNORES.some((r) => r.test(dep))) {
return 'export default undefined;';
}

Expand Down

0 comments on commit ce384db

Please sign in to comment.